Interface IdentifiableContentBean
-
- All Superinterfaces:
ContentBean
- All Known Subinterfaces:
HippoAssetBean
,HippoBean
,HippoCompoundBean
,HippoDocumentBean
,HippoFacetChildNavigationBean
,HippoFacetNavigationBean
,HippoFolderBean
,HippoGalleryImageBean
,HippoGalleryImageSetBean
,HippoHtmlBean
,HippoMirrorBean
,HippoRequestBean
,HippoResourceBean
,HippoResultSetBean
,HippoVirtualOnlyBean
public interface IdentifiableContentBean extends ContentBean
The base interface for all identifiable beans: This includes beans that can be completely independent of jcr, for example a bean that represents some external src. ThegetIdentifier()
must return the unique identifier for thisIdentifiableContentBean
: This is typically the identifier used in indexes
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getIdentifier()
This returns the identifier of the backing provider for this bean, for example some UUID or /documents/content/myprojec/news/article or http://www.example.com/foo/bar, or a RDBMS id, etc It is not allowed for any implementation to returnnull
default String
getRepresentationId()
The representational id for aIdentifiableContentBean
is by default equal to thegetIdentifier()
however implementations can change choose to return another id than thegetIdentifier()
.void
setIdentifier(String identifier)
-
-
-
Method Detail
-
getIdentifier
@IndexField(name="id", ignoreInCompound=true) String getIdentifier()
This returns the identifier of the backing provider for this bean, for example some UUID or /documents/content/myprojec/news/article or http://www.example.com/foo/bar, or a RDBMS id, etc It is not allowed for any implementation to return
null
Since the return value for this method is used as the index document identifier, it must be unique for every bean that must be indexed
- Returns:
- the identifier for this
IdentifiableContentBean
-
setIdentifier
void setIdentifier(String identifier)
- Parameters:
identifier
- sets the identifier for thisIdentifiableContentBean
- See Also:
getIdentifier()
-
getRepresentationId
default String getRepresentationId()
The representational id for aIdentifiableContentBean
is by default equal to thegetIdentifier()
however implementations can change choose to return another id than thegetIdentifier()
. An example of a subclass (interface) returning a different value is for example theHippoDocumentBean
, since this one does return forgetRepresentationId()
the id of the backing JCR handle uuid instead of the uuid of the document variant.- Returns:
- the representational id for this
IdentifiableContentBean
-
-