Package de.espirit.firstspirit.access
Interface ReferenceEntry
- All Superinterfaces:
Comparable<ReferenceEntry>,Serializable
Base definition for an entry to the references system.
- Since:
- 3.1.172
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intReference from/to anEntity.static final intReference from/to a content-store element.static final intExternal reference.static final intReference from/to a global-store element.static final intReference from/to a media-store element.static final intReference from/to a page-store element.static final intReference from/to related project (this type is always combined with another type).static final inttemplate:"name", e.g. in $CMS_RENDER(template:"",static final intscript:"name", e.g. in $CMS_RENDER(script:"",static final intpagefolder:"name", e.g. in $CMS_RENDER(pagefolder:"name",static final intReference from/to a site-store element.static final intReference from/to a store element.static final intReference from/to a template-store element. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the category of an external reference.Return a type dependent display text.longgetId()Provides the id of the referenced node (store-element).longProvides the project id of the referenced element.@Nullable IDProviderThe referenced node.@Nullable ObjectProvides the referenced node.@Nullable StringProvides a textual reference representation, e.g.booleanIndicates the node coming from the release store.@Nullable StringReturns symbolic name of remote configuration.Returnsstore-typeof the referenced element ornull, e.g. for external references.intgetType()Get the type of this reference.Returns usages of this reference.booleanisBroken()A reference may be broken, e.g. if a medium was referenced from a picture input component and the medium was deleted afterwards.booleanisRemote()Indicates whether this reference is refering to a remote project.booleanisType(int type) Returnstrueif this element is of the giventype.voidrefresh()Refreshes this reference entry, e.g. by removing cached objects, recalculating broken status or refreshing referenced elements.Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
PAGE_STORE_REFERENCE
static final int PAGE_STORE_REFERENCEReference from/to a page-store element.- Since:
- 3.1.324
- See Also:
-
SITE_STORE_REFERENCE
static final int SITE_STORE_REFERENCEReference from/to a site-store element.- Since:
- 3.1.324
- See Also:
-
MEDIA_STORE_REFERENCE
static final int MEDIA_STORE_REFERENCEReference from/to a media-store element.- Since:
- 3.1.324
- See Also:
-
TEMPLATE_STORE_REFERENCE
static final int TEMPLATE_STORE_REFERENCEReference from/to a template-store element.- Since:
- 3.1.324
- See Also:
-
GLOBAL_STORE_REFERENCE
static final int GLOBAL_STORE_REFERENCEReference from/to a global-store element.- Since:
- 3.1.324
- See Also:
-
CONTENT_STORE_REFERENCE
static final int CONTENT_STORE_REFERENCEReference from/to a content-store element.- Since:
- 3.1.324
- See Also:
-
CONTENT_REFERENCE
static final int CONTENT_REFERENCEReference from/to anEntity.- Since:
- 4.0
- See Also:
-
RELATED_PROJECT_REFERENCE
static final int RELATED_PROJECT_REFERENCEReference from/to related project (this type is always combined with another type).- Since:
- 3.1.324
- See Also:
-
RENDER_TEMPLATE_REFERENCE
static final int RENDER_TEMPLATE_REFERENCEtemplate:"name", e.g. in $CMS_RENDER(template:"", ..)$- Since:
- 4.0
- See Also:
-
SCRIPT_REFERENCE
static final int SCRIPT_REFERENCEscript:"name", e.g. in $CMS_RENDER(script:"", ..)$- Since:
- 4.0
- See Also:
-
SITE_STORE_FOLDER_REFERENCE
static final int SITE_STORE_FOLDER_REFERENCEpagefolder:"name", e.g. in $CMS_RENDER(pagefolder:"name", ..)$- Since:
- 4.0.43
- See Also:
-
EXTERNAL_REFERENCE
static final int EXTERNAL_REFERENCEExternal reference.- Since:
- 3.1.324
- See Also:
-
STORE_ELEMENT_REFERENCE
static final int STORE_ELEMENT_REFERENCEReference from/to a store element.- Since:
- 3.1.324
- See Also:
-
-
Method Details
-
isType
boolean isType(int type) Returnstrueif this element is of the giventype. Iftypecontains therelated project flagthis reference has to be external to returntrue.isType(MEDIA_STORE_ELEMENT|CONTENT_STORE_REFERENCE)
returnstrueiff this reference is a reference to a media- or a content-store element (media or content).isType(MEDIA_STORE_ELEMENT) && isType(RELATED_PROJECT_REFERENCE)
returnstrueiff this reference is an external reference to a media-store element (external and media).
- Parameters:
type- A single type flag (e.g.SITE_STORE_REFERENCE) or a binary combination of multiple type flags (e.g.SITE_STORE_REFERENCE|MEDIA_STORE_REFERENCE).- Returns:
trueif this element matches any of the given flags encoded intype, otherwise returnsfalse.- Since:
- 3.1.324
- See Also:
-
getType
int getType()Get the type of this reference.- Returns:
- type of this reference.
- Since:
- 3.1.324
-
getId
long getId()Provides the id of the referenced node (store-element).- Returns:
- The id.
- Since:
- 3.1.172
-
getProjectId
long getProjectId()Provides the project id of the referenced element.- Returns:
- The project id.
- Since:
- 3.1.324
-
getRelease
boolean getRelease()Indicates the node coming from the release store.- Returns:
trueif the node is from the release store- Since:
- 3.1.172
-
getReferencedObject
Provides the referenced node. It may benull, if the node is not or no longer visible in the current session or has been deleted or the referenceis broken.- Returns:
- The referenced node or null.
- Since:
- 3.1.324
-
getReferencedElement
The referenced node. It may benullif the node is not or no longer visible in the current session, or has been deleted, or the referenceis broken, orreferenced objectis not anIDProvider.- Returns:
- The referenced node or null.
- Since:
- 4.0
-
getReferenceString
Provides a textual reference representation, e.g. "media:logo" ornullif the referenced object cannot be referenced by name.- Returns:
- The reference representation or null.
- Since:
- 3.1.324
-
getDisplayText
String getDisplayText()Return a type dependent display text.- Since:
- 4.2
-
isBroken
boolean isBroken()A reference may be broken, e.g. if a medium was referenced from a picture input component and the medium was deleted afterwards.- Since:
- 3.1.172
-
isRemote
boolean isRemote()Indicates whether this reference is refering to a remote project.- Returns:
trueif this reference is a remote reference.- Since:
- 3.1.324
-
getRemote
Returns symbolic name of remote configuration.- Returns:
- symbolic name of remote configuration.
- Since:
- 4.2.200
- See Also:
-
getUsages
ReferenceEntry[] getUsages()Returns usages of this reference. E.g. in case of abrokenreference this method returns references to elements where this broken reference is still in use (and still broken).- Returns:
- usages of this reference.
- Since:
- 4.0
-
getStoreType
Returnsstore-typeof the referenced element ornull, e.g. for external references.- Returns:
- store-type of the referenced element or
null, e.g. for external references. - Since:
- 4.2.200
-
refresh
void refresh()Refreshes this reference entry, e.g. by removing cached objects, recalculating broken status or refreshing referenced elements.- Since:
- 4.2.406
-
getCategory
Returns the category of an external reference.- Returns:
- The category of references of
typeEXTERNAL_REFERENCEandnullfor all other reference types. - Since:
- 5.2.14
-