public interface TargetReference
reference editor
(FS_REFERENCE).
Use the factory
to create new instances.
Modifier and Type | Interface and Description |
---|---|
static class |
TargetReference.TargetReferences
TargetReference factory methods.
|
Modifier and Type | Method and Description |
---|---|
IDProvider |
get()
Get the reference of the element currently set in this TargetReference.
|
Content2 |
getContent()
|
DocumentGroup |
getDocumentGroup()
|
Language |
getLanguage()
Get the language of the selected reference.
|
Media |
getMedia()
Returns a set medium if any or
null if reference is not a type of Media . |
Page |
getPage()
Returns a set page or null if referenced element is not type of
Page . |
PageRef |
getPageRef()
Returns a set page reference or
null if referenced element is not type of PageRef . |
String |
getRemoteSymName()
Return the symbolic remote project name set in the local remote project configuration.
|
Section<?> |
getSection()
Get the referenced section.
|
String |
getSectionName()
Return the name of the
Section if the referenced element is of type Section. |
Store.Type |
getStoreType()
Get the kind of
Store.Type for the selected item. |
String |
getUid()
Retrieve the referenced element's unique id.
|
IDProvider.UidType |
getUidType()
Get the
IDProvider.UidType of the given element. |
boolean |
isEmpty()
Tests if this
TargetReference currently has no element set. |
Section<?> |
loadSection(Page page,
String sectionName)
Load a section of the given referenced page identified by its section name.
|
void |
resetTo(IDProvider reference,
String remote)
Reset the reference and the remote information and infer settings for UID and UidType.
|
void |
set(IDProvider reference)
Set a new element reference of type
IDProvider and infer settings for UID and UidType. |
void |
setRemoteSymName(String remoteProjectSymName)
If the set element is a remote project reference, this method set the symbolic remote project name definied
in the local project configuration.
|
void |
setSection(Section<?> section)
Set the section to be referenced.
|
void |
setSectionName(String name)
Use this to set the section.
|
void |
setUid(String uid)
Set the Uid of the referenced element.
|
void |
setUidType(IDProvider.UidType type)
Set the
IDProvider.UidType of the referenced element. |
@ApiDoc(comment="Tests if this TargetReference currently has no element set.", since="4.2") boolean isEmpty()
TargetReference
currently has no element set.set(IDProvider)
,
get()
@ApiDoc(comment="Get the language of the selected reference.", since="4.2") Language getLanguage()
@ApiDoc(comment="Get the kind of Store.Type for the selected item.", since="4.2") Store.Type getStoreType()
Store.Type
for the selected item.Store.Type
@ApiDoc(comment="Retrieve the referenced element\'s unique id.", since="4.2") String getUid()
IDProvider.getUid()
@ApiDoc(comment="Set the Uid of the referenced element.", since="4.2") void setUid(String uid)
uid
- the referenced element IDProvider.getUid()
@ApiDoc(comment="Get the IDProvider.UidType of the given element.", since="4.2") IDProvider.UidType getUidType()
IDProvider.UidType
of the given element.IDProvider.getUidType()
@ApiDoc(comment="Set the IDProvider.UidType of the referenced element.", since="4.2") void setUidType(IDProvider.UidType type)
IDProvider.UidType
of the referenced element.type
- the IDProvider.UidType
to set for the referenced element.@ApiDoc(comment="Get the reference of the element currently set in this TargetReference.", since="4.2") @Nullable IDProvider get()
IDProvider
.IDProvider
element@ApiDoc(comment="Set a new element reference of type IDProvider and infer settings for UID and UidType.", since="4.2") void set(IDProvider reference)
IDProvider
and infer settings for UID and UidType.reference
- the IDProvider
to set@ApiDoc(comment="Reset the reference and the remote information and infer settings for UID and UidType.", since="4.2.202") void resetTo(IDProvider reference, @Nullable String remote)
reference
- The reference to be set and inferred from.remote
- The symbolic remote project name.@ApiDoc(comment="Return the symbolic remote project name set in the local remote project configuration.", since="4.2") @Nullable String getRemoteSymName()
setRemoteSymName(String)
@ApiDoc(comment="If the set element is a remote project reference, this method set the symbolic remote project name definied in the local project configuration.", since="4.2") void setRemoteSymName(@Nullable String remoteProjectSymName)
remoteProjectSymName
- the name to set@ApiDoc(comment="Get the referenced section.", since="4.2") @Nullable Section<?> getSection()
NOTE: This method is broken for reference gadgets operating in section only mode, where it always returns
null
. The way here is to use the known page element and the section name
with loadSection(Page, String)
to resolve the according section element.
Section
@ApiDoc(comment="Set the section to be referenced.", since="4.2") void setSection(@Nullable Section<?> section)
section
- @ApiDoc(comment="Load a section of the given referenced page identified by its section name.", since="4.2") @Nullable Section<?> loadSection(@NotNull Page page, String sectionName)
page
- The reference to the section's page.sectionName
- The name of the section.@ApiDoc(comment="Use this to set the section.", since="4.2") void setSectionName(@Nullable String name)
name
- Section.getName()@ApiDoc(comment="Return the name of the Section if the referenced element is of type Section.", since="4.2") String getSectionName()
Section
if the referenced element is of type Section.@ApiDoc(comment="Returns a set page reference or null if referenced element is not type of PageRef.", since="4.2") @Nullable PageRef getPageRef()
null
if referenced element is not type of PageRef
.null
.@ApiDoc(comment="Returns a set page or null if referenced element is not type of Page.", since="4.2") @Nullable Page getPage()
Page
.
Also returns the page of a section, referenced by this element.null
.@ApiDoc(comment="Returns a set medium if any or null if reference is not a type of Media.", since="4.2") @Nullable Media getMedia()
null
if reference is not a type of Media
.null
.@ApiDoc(comment="Returns a Content2 reference or null if reference is not a type of Content2.", since="4.2") @Nullable Content2 getContent()
null
.@ApiDoc(comment="Returns a DocumentGroup reference or null if the referenced instance is not a DocumentGroup.", since="4.2.17") @Nullable DocumentGroup getDocumentGroup()
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210