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 element reference
|
Content2 |
getContent()
|
DocumentGroup |
getDocumentGroup()
|
Language |
getLanguage() |
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() |
Store.Type |
getStoreType() |
String |
getUid() |
IDProvider.UidType |
getUidType() |
boolean |
isEmpty()
Tests if this TargetReference has no element set. where element is always a type of
IDProvider . |
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 . |
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 configuation.
|
void |
setSection(Section<?> section)
Set the section to be referenced.
|
void |
setSectionName(String name)
Use this to set the section.
|
void |
setUid(String uid) |
void |
setUidType(IDProvider.UidType type) |
boolean isEmpty()
IDProvider
.set(de.espirit.firstspirit.access.store.IDProvider)
,
get()
Language getLanguage()
Store.Type getStoreType()
Store.Type
String getUid()
IDProvider.getUid()
void setUid(String uid)
uid
- the referenced element IDProvider.getUid()
IDProvider.UidType getUidType()
IDProvider.getUidType()
void setUidType(IDProvider.UidType type)
type
- the IDProvider.UidType
to set for the referenced element.@Nullable IDProvider get()
IDProvider
referenced elementvoid set(IDProvider reference)
IDProvider
.reference
- the IDProvider
to setvoid resetTo(IDProvider reference, String remote)
reference
- The reference to be set and inferred from.remote
- The symbolic remote project name.@Nullable String getRemoteSymName()
setRemoteSymName(String)
void setRemoteSymName(String remoteProjectSymName)
remoteProjectSymName
- the name to set@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
void setSection(@Nullable Section<?> section)
section
- @Nullable Section<?> loadSection(@NotNull Page page, String sectionName)
page
- The reference to the section's page.sectionName
- The name of the section.void setSectionName(String name)
name
- Section.getName()String getSectionName()
@Nullable PageRef getPageRef()
null
if referenced element is not type of PageRef
.null
.@Nullable Page getPage()
Page
.
Also returns the page of a section, referenced by this element.null
.@Nullable Media getMedia()
null
if reference is not a type of Media
.null
.@Nullable Content2 getContent()
null
.@Nullable DocumentGroup getDocumentGroup()
Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408