Class Component
java.lang.Object
pt.ist.fenixframework.core.AbstractDomainObject
org.fenixedu.cms.domain.component.Component_Base
org.fenixedu.cms.domain.component.Component
- All Implemented Interfaces:
Serializable,Cloneable,pt.ist.fenixframework.DomainObject
- Direct Known Subclasses:
ListCategoryPosts_Base,StaticPost_Base,StrategyBasedComponent_Base
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class pt.ist.fenixframework.core.AbstractDomainObject
pt.ist.fenixframework.core.AbstractDomainObject.SerializedForm -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonArrayavailableComponents(Site site) abstract Componentclone(CloneCache cloneCache) Class<?>voiddelete()static ComponentforType(Class<? extends CMSComponent> type) static ComponentDescriptorSearches for the class of a component with a given type.getName()getType()abstract voidhandle(Page page, TemplateContext componentContext, TemplateContext globalContext) Provides the necessary info needed to render the component on a given page and context.abstract com.google.gson.JsonObjectjson()static voidRegisters a new class has a component.Methods inherited from class org.fenixedu.cms.domain.component.Component_Base
addInstalledPage, getCreatedBy, getCreationDate, getInstalledPageSet, getRelationComponentPage, getRelationComponentUser, removeInstalledPage, setCreatedBy, setCreationDate, setTypeMethods inherited from class pt.ist.fenixframework.core.AbstractDomainObject
checkForDeletionBlockers, deleteDomainObject, ensureOid, equals, getDeletionBlockers, getDomainModel, getExternalId, getOid, hashCode, init$Instance, makeSerializedForm, toString, writeReplace
-
Field Details
-
COMPONENTS
-
-
Constructor Details
-
Component
public Component()The loggedUsercreates a new component.
-
-
Method Details
-
register
Registers a new class has a component.- Parameters:
c- the class being registered as a component.
-
forType
Searches for the class of a component with a given type.- Parameters:
type- the type of the component.- Returns:
- the class of the component with the given type.
-
availableComponents
-
getName
- Returns:
- the name of the component.
-
getDescription
- Returns:
- the description of the component.
-
getType
- Overrides:
getTypein classComponent_Base- Returns:
- the type of the component.
-
handle
public abstract void handle(Page page, TemplateContext componentContext, TemplateContext globalContext) Provides the necessary info needed to render the component on a given page and context.- Parameters:
page- the page where the component will be rendered.componentContext- local context for the component.globalContext- global context where the component is being rendered.
-
clone
-
delete
public void delete() -
componentType
-
forType
-
json
public abstract com.google.gson.JsonObject json()
-