public interface ReferenceEntry extends Serializable, Comparable<ReferenceEntry>
Modifier and Type | Field and Description |
---|---|
static int |
CONTENT_REFERENCE
Reference from/to an
Entity . |
static int |
CONTENT_STORE_REFERENCE
Reference from/to a content-store element.
|
static int |
EXTERNAL_REFERENCE
External reference.
|
static int |
GLOBAL_STORE_REFERENCE
Reference from/to a global-store element.
|
static int |
MEDIA_STORE_REFERENCE
Reference from/to a media-store element.
|
static int |
PAGE_STORE_REFERENCE
Reference from/to a page-store element.
|
static int |
RELATED_PROJECT_REFERENCE
Reference from/to related project (this type is always combined with another type).
|
static int |
RENDER_TEMPLATE_REFERENCE
template:"name", e.g. in $CMS_RENDER(template:"",
|
static int |
SCRIPT_REFERENCE
script:"name", e.g. in $CMS_RENDER(script:"",
|
static int |
SITE_STORE_FOLDER_REFERENCE
pagefolder:"name", e.g. in $CMS_RENDER(pagefolder:"name",
|
static int |
SITE_STORE_REFERENCE
Reference from/to a site-store element.
|
static int |
STORE_ELEMENT_REFERENCE
Reference from/to a store element.
|
static int |
TEMPLATE_STORE_REFERENCE
Reference from/to a template-store element.
|
Modifier and Type | Method and Description |
---|---|
String |
getCategory()
Returns the category of an external reference.
|
String |
getDisplayText()
Return a type dependent display text.
|
long |
getId()
Provides the id of the referenced node (store-element).
|
long |
getProjectId()
Provides the project id of the referenced element.
|
IDProvider |
getReferencedElement()
The referenced node.
|
Object |
getReferencedObject()
Provides the referenced node.
|
String |
getReferenceString()
Provides a textual reference representation, e.g.
|
boolean |
getRelease()
Indicates the node coming from the release store.
|
String |
getRemote()
Returns symbolic name of remote configuration.
|
Store.Type |
getStoreType()
Returns
store-type of the referenced element or null , e.g. for external references. |
int |
getType()
Get the type of this reference.
|
ReferenceEntry[] |
getUsages()
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)
Returns
true if this element is of the given type . |
void |
refresh()
Refreshes this reference entry, e.g. by removing cached objects, recalculating broken status or
refreshing referenced elements.
|
compareTo
static final int PAGE_STORE_REFERENCE
static final int SITE_STORE_REFERENCE
static final int MEDIA_STORE_REFERENCE
static final int TEMPLATE_STORE_REFERENCE
static final int GLOBAL_STORE_REFERENCE
static final int CONTENT_STORE_REFERENCE
static final int CONTENT_REFERENCE
Entity
.static final int RELATED_PROJECT_REFERENCE
static final int RENDER_TEMPLATE_REFERENCE
static final int SCRIPT_REFERENCE
static final int SITE_STORE_FOLDER_REFERENCE
static final int EXTERNAL_REFERENCE
static final int STORE_ELEMENT_REFERENCE
boolean isType(int type)
true
if this element is of the given type
. If type
contains the
related project flag
this reference has to be external to return true
.
isType(MEDIA_STORE_ELEMENT|CONTENT_STORE_REFERENCE)
true
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)
true
iff this
reference is an external reference to a media-store element (external and media).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
).true
if this element matches any of the given flags encoded in type
, otherwise returns
false
.PAGE_STORE_REFERENCE
,
SITE_STORE_REFERENCE
,
MEDIA_STORE_REFERENCE
,
TEMPLATE_STORE_REFERENCE
,
GLOBAL_STORE_REFERENCE
,
CONTENT_STORE_REFERENCE
,
CONTENT_REFERENCE
,
RELATED_PROJECT_REFERENCE
,
RENDER_TEMPLATE_REFERENCE
,
SCRIPT_REFERENCE
,
SITE_STORE_FOLDER_REFERENCE
,
EXTERNAL_REFERENCE
,
STORE_ELEMENT_REFERENCE
int getType()
long getId()
long getProjectId()
boolean getRelease()
true
if the node is from the release store@Nullable Object getReferencedObject()
null
, if the node is not or no longer visible in the
current session or has been deleted or the reference is broken
.@Nullable IDProvider getReferencedElement()
null
if the node is not or no longer visible in the
current session, or has been deleted, or the reference is broken
, or
referenced object
is not an IDProvider
.@Nullable String getReferenceString()
null
if the referenced object
cannot be referenced by name.String getDisplayText()
boolean isBroken()
boolean isRemote()
true
if this reference is a remote reference.@Nullable String getRemote()
UserService.getRemoteUserService(String)
,
RemoteProjectConfiguration
ReferenceEntry[] getUsages()
broken
reference this method
returns references to elements where this broken reference is still in use (and still broken).@Nullable Store.Type getStoreType()
store-type
of the referenced element or null
, e.g. for external references.null
, e.g. for external references.void refresh()
@Nullable String getCategory()
type
EXTERNAL_REFERENCE
and null
for
all other reference types.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210