001: /*
002: * Copyright 2001-2006 C:1 Financial Services GmbH
003: *
004: * This software is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License Version 2.1, as published by the Free Software Foundation.
007: *
008: * This software is distributed in the hope that it will be useful,
009: * but WITHOUT ANY WARRANTY; without even the implied warranty of
010: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
011: * Lesser General Public License for more details.
012: *
013: * You should have received a copy of the GNU Lesser General Public
014: * License along with this library; if not, write to the Free Software
015: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
016: */
017:
018: package de.finix.contelligent;
019:
020: import java.util.Set;
021:
022: import de.finix.contelligent.content.Metadata;
023: import de.finix.contelligent.core.security.ContelligentPrincipal;
024: import de.finix.contelligent.exception.ComponentPersistenceException;
025: import de.finix.contelligent.resource.Resource;
026: import de.finix.contelligent.search.Metainfo;
027:
028: /**
029: * The <code>ComponentContext</code> interface provides access to meta
030: * informations about a {@link Component}.
031: */
032: public interface ComponentContext extends java.io.Serializable {
033:
034: Type getType();
035:
036: String getComposedBlueprintName();
037:
038: ComponentPath getPath();
039:
040: boolean requiresSecureTransfer();
041:
042: /**
043: * Answer true if <code>requiresSecureTransfer</code> is defined in this
044: * context or inherited from the parent.
045: */
046: boolean definesSecureTransfer();
047:
048: Contelligent getSystem();
049:
050: /**
051: * Returns the component-manager associated with the current transaction.
052: *
053: * @see CallData#getActualManager
054: */
055: ComponentManager getCallManager();
056:
057: /**
058: * Returns the persistence manager of this component, that is the
059: * {@link ComponentManager} this component was loaded by.
060: */
061: ComponentManager getPersistenceManager();
062:
063: boolean isFinal();
064:
065: long getLastModified();
066:
067: int getStatus();
068:
069: public Resource getContentResource(String identifier)
070: throws ComponentPersistenceException;
071:
072: public void setContentResource(String identifier, Resource resource);
073:
074: public void removeContentResource(String identifier);
075:
076: public Resource getTemplateResource(String identifier)
077: throws ComponentPersistenceException;
078:
079: public void setTemplateResource(String identifier, Resource resource);
080:
081: public void setModifiedBy(ContelligentPrincipal principal);
082:
083: public ContelligentPrincipal getModifiedBy();
084:
085: public void removeTemplateResource(String identifier);
086:
087: public Set getSensitiveContentCategories();
088:
089: public Set getSensitiveTemplateCategories();
090:
091: public Set getContentResourceIdentifiers();
092:
093: public Set getTemplateResourceIdentifiers();
094:
095: void putMetainfo(Metainfo metainfo);
096:
097: public boolean isRemoved();
098:
099: public boolean isRecreated();
100:
101: public Metadata getMetadata();
102:
103: public String getPublisherName();
104:
105: public String getPublisherType();
106: }
|