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
Modifier and TypeFieldDescriptionstatic final int
Reference from/to anEntity
.static final int
Reference from/to a content-store element.static final int
External reference.static final int
Reference from/to a global-store element.static final int
Reference from/to a media-store element.static final int
Reference from/to a page-store element.static final int
Reference from/to related project (this type is always combined with another type).static final int
template:"name", e.g. in $CMS_RENDER(template:"",static final int
script:"name", e.g. in $CMS_RENDER(script:"",static final int
pagefolder:"name", e.g. in $CMS_RENDER(pagefolder:"name",static final int
Reference from/to a site-store element.static final int
Reference from/to a store element.static final int
Reference from/to a template-store element. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
Returns the category of an external reference.Return a type dependent display text.long
getId()
Provides the id of the referenced node (store-element).long
Provides the project id of the referenced element.@Nullable IDProvider
The referenced node.@Nullable Object
Provides the referenced node.@Nullable String
Provides a textual reference representation, e.g.boolean
Indicates the node coming from the release store.@Nullable String
Returns symbolic name of remote configuration.Returnsstore-type
of the referenced element ornull
, e.g. for external references.int
getType()
Get the type of this reference.Returns usages of this reference.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.boolean
isRemote()
Indicates whether this reference is refering to a remote project.boolean
isType
(int type) Returnstrue
if this element is of the giventype
.void
refresh()
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) Returnstrue
if this element is of the giventype
. Iftype
contains therelated project flag
this reference has to be external to returntrue
.isType(MEDIA_STORE_ELEMENT|CONTENT_STORE_REFERENCE)
returnstrue
iff this reference is a reference to a media- or a content-store element (media or content).isType(MEDIA_STORE_ELEMENT) && isType(RELATED_PROJECT_REFERENCE)
returnstrue
iff 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:
true
if 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:
true
if 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 benull
if the node is not or no longer visible in the current session, or has been deleted, or the referenceis broken
, orreferenced object
is not anIDProvider
.- Returns:
- The referenced node or null.
- Since:
- 4.0
-
getReferenceString
Provides a textual reference representation, e.g. "media:logo" ornull
if 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:
true
if 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 abroken
reference 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-type
of 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
type
EXTERNAL_REFERENCE
andnull
for all other reference types. - Since:
- 5.2.14
-