public class CmsFavoriteEntry extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsFavoriteEntry.Type
Represents the type of the favorite.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
JSON_DETAIL
JSON key.
|
static java.lang.String |
JSON_PROJECT
JSON key.
|
static java.lang.String |
JSON_SITEROOT
JSON key.
|
static java.lang.String |
JSON_STRUCTUREID
JSON key.
|
static java.lang.String |
JSON_TYPE
JSON key.
|
| Constructor and Description |
|---|
CmsFavoriteEntry()
Creates a new entry.
|
CmsFavoriteEntry(JSONObject obj)
Creates a new entry from a JSON object.
|
| Modifier and Type | Method and Description |
|---|---|
CmsUUID |
getDetailId()
Gets the detail id.
|
CmsUUID |
getProjectId()
Gets the project id.
|
java.lang.String |
getSiteRoot()
Gets the site root.
|
CmsUUID |
getStructureId()
Gets the structure id
|
CmsFavoriteEntry.Type |
getType()
Gets the type.
|
static CmsUUID |
readId(JSONObject obj,
java.lang.String key)
Reads a UUID from a JSON object.
|
void |
setDetailId(CmsUUID detailId)
Sets the detail id.
|
void |
setProjectId(CmsUUID projectId)
Sets the project id.
|
void |
setSiteRoot(java.lang.String siteRoot)
Sets the site root.
|
void |
setStructureId(CmsUUID structureId)
Sets the structure id.
|
void |
setType(CmsFavoriteEntry.Type type)
Sets the type.
|
JSONObject |
toJson()
Converts this object to JSON.
|
java.lang.String |
updateContextAndGetFavoriteUrl(CmsObject cms)
Prepares the CmsObject for jumping to this favorite location, and returns the appropriate URL.
|
public static final java.lang.String JSON_DETAIL
public static final java.lang.String JSON_PROJECT
public static final java.lang.String JSON_SITEROOT
public static final java.lang.String JSON_STRUCTUREID
public static final java.lang.String JSON_TYPE
public CmsFavoriteEntry()
public CmsFavoriteEntry(JSONObject obj)
obj - the JSON objectpublic static CmsUUID readId(JSONObject obj, java.lang.String key)
obj - the JSON objectkey - the JSON keypublic CmsUUID getDetailId()
public CmsUUID getProjectId()
public java.lang.String getSiteRoot()
public CmsUUID getStructureId()
public CmsFavoriteEntry.Type getType()
public void setDetailId(CmsUUID detailId)
detailId - the detail idpublic void setProjectId(CmsUUID projectId)
projectId - the project idpublic void setSiteRoot(java.lang.String siteRoot)
siteRoot - the site rootpublic void setStructureId(CmsUUID structureId)
structureId - the structure idpublic void setType(CmsFavoriteEntry.Type type)
type - the typepublic JSONObject toJson() throws JSONException
JSONException - if JSON operations failpublic java.lang.String updateContextAndGetFavoriteUrl(CmsObject cms) throws CmsException
cms - the CmsObject to initialize for jumping to the favoriteCmsException - if something goes wrong