Class Template
- java.lang.Object
-
- com.gentics.contentnode.rest.model.Template
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TemplateInNode
,TemplateInPackage
public class Template extends Object implements Serializable
Template object representing a template in GCN- Author:
- johannes2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
cdate
Date when the file was createdprotected Integer
channelId
Channel IDprotected Integer
channelSetId
Channelset IDprotected User
creator
Creator of the fileprotected int
edate
Date when the file was modified lastprotected User
editor
Latest contributor to the fileprotected Integer
folderId
Folder id of the folder for which the template was fetchedprotected boolean
inherited
true when the template is inherited from a master channel, false if notprotected boolean
locked
true when the template is locked, false if notprotected MarkupLanguage
markupLanguage
Markup languageprotected boolean
master
true if the template is a master template, false if notprotected Integer
masterId
id of the master template, if this template is a localized copy of another
-
Constructor Summary
Constructors Constructor Description Template()
Constructor for JAXB
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
getCdate()
Creation dateInteger
getChannelId()
Get the channel idInteger
getChannelSetId()
Get the channelset idUser
getCreator()
CreatorString
getDescription()
Template descriptionint
getEdate()
Last Edit dateUser
getEditor()
Last EditorInteger
getFolderId()
Folder IDString
getGlobalId()
Global Id of the templateInteger
getId()
IDString
getInheritedFrom()
Name of the node this template is inherited fromMarkupLanguage
getMarkupLanguage()
Markup languageInteger
getMasterId()
Master IDString
getMasterNode()
Name of the node, the master object belongs toString
getName()
Name of the templateMap<String,Tag>
getObjectTags()
Returns the list of object tags for this templateString
getPath()
Folder pathString
getSource()
Returns the template sourceMap<String,TemplateTag>
getTemplateTags()
Tags of the templateboolean
isInherited()
True if the template is inheritedboolean
isLocked()
True if the template is lockedboolean
isMaster()
Get whether this template is a master templatevoid
setCdate(int cdate)
void
setChannelId(Integer channelId)
Set the channel idvoid
setChannelSetId(Integer channelSetId)
Set the channelset idvoid
setCreator(User creator)
void
setDescription(String description)
Sets the template descriptionvoid
setEdate(int edate)
void
setEditor(User editor)
void
setFolderId(Integer folderId)
void
setGlobalId(String globalId)
Set the global Idvoid
setId(Integer id)
Sets the template idvoid
setInherited(boolean inherited)
void
setInheritedFrom(String inheritedFrom)
sets inherited fromvoid
setLocked(boolean locked)
void
setMarkupLanguage(MarkupLanguage markupLanguage)
void
setMaster(boolean master)
Set true for master templates, false for localized copiesvoid
setMasterId(Integer masterId)
void
setMasterNode(String masterNode)
Set the name of the node, the master object belongs tovoid
setName(String name)
Sets the name of the templatevoid
setObjectTags(Map<String,Tag> objectTags)
Sets the object tags for this templatevoid
setPath(String path)
Set the pathvoid
setSource(String source)
Sets the source of the templatevoid
setTemplateTags(Map<String,TemplateTag> templateTags)
Set the tags
-
-
-
Field Detail
-
creator
protected User creator
Creator of the file
-
cdate
protected int cdate
Date when the file was created
-
editor
protected User editor
Latest contributor to the file
-
edate
protected int edate
Date when the file was modified last
-
locked
protected boolean locked
true when the template is locked, false if not
-
inherited
protected boolean inherited
true when the template is inherited from a master channel, false if not
-
master
protected boolean master
true if the template is a master template, false if not
-
masterId
protected Integer masterId
id of the master template, if this template is a localized copy of another
-
markupLanguage
protected MarkupLanguage markupLanguage
Markup language
-
folderId
protected Integer folderId
Folder id of the folder for which the template was fetched
-
channelId
protected Integer channelId
Channel ID
-
channelSetId
protected Integer channelSetId
Channelset ID
-
-
Method Detail
-
getInheritedFrom
public String getInheritedFrom()
Name of the node this template is inherited from- Returns:
-
setInheritedFrom
public void setInheritedFrom(String inheritedFrom)
sets inherited from- Parameters:
inheritedFrom
-
-
getMasterNode
public String getMasterNode()
Name of the node, the master object belongs to- Returns:
- node name
-
setMasterNode
public void setMasterNode(String masterNode)
Set the name of the node, the master object belongs to- Parameters:
masterNode
- node name
-
getId
public Integer getId()
ID- Returns:
-
setId
public void setId(Integer id)
Sets the template id- Parameters:
id
-
-
getGlobalId
public String getGlobalId()
Global Id of the template- Returns:
- the global Id
-
setGlobalId
public void setGlobalId(String globalId)
Set the global Id- Parameters:
globalId
- global Id
-
getName
public String getName()
Name of the template- Returns:
-
setName
public void setName(String name)
Sets the name of the template- Parameters:
name
-
-
getDescription
public String getDescription()
Template description- Returns:
-
setDescription
public void setDescription(String description)
Sets the template description- Parameters:
description
-
-
getCreator
public User getCreator()
Creator- Returns:
- the creator
-
getCdate
public int getCdate()
Creation date- Returns:
- the cdate
-
getEditor
public User getEditor()
Last Editor- Returns:
- the editor
-
getEdate
public int getEdate()
Last Edit date- Returns:
- the edate
-
setCreator
public void setCreator(User creator)
- Parameters:
creator
- the creator to set
-
setCdate
public void setCdate(int cdate)
- Parameters:
cdate
- the cdate to set
-
setEditor
public void setEditor(User editor)
- Parameters:
editor
- the editor to set
-
setEdate
public void setEdate(int edate)
- Parameters:
edate
- the edate to set
-
isLocked
public boolean isLocked()
True if the template is locked- Returns:
- the locked
-
setLocked
public void setLocked(boolean locked)
- Parameters:
locked
- the locked to set
-
getMarkupLanguage
public MarkupLanguage getMarkupLanguage()
Markup language- Returns:
- the markupLanguage
-
setMarkupLanguage
public void setMarkupLanguage(MarkupLanguage markupLanguage)
- Parameters:
markupLanguage
- the markupLanguage to set
-
isInherited
public boolean isInherited()
True if the template is inherited- Returns:
- the inherited
-
setInherited
public void setInherited(boolean inherited)
- Parameters:
inherited
- the inherited to set
-
setFolderId
public void setFolderId(Integer folderId)
-
getFolderId
public Integer getFolderId()
Folder ID- Returns:
-
getMasterId
public Integer getMasterId()
Master ID- Returns:
-
setMasterId
public void setMasterId(Integer masterId)
-
getPath
public String getPath()
Folder path- Returns:
- path
-
setPath
public void setPath(String path)
Set the path- Parameters:
path
- the path
-
setTemplateTags
public void setTemplateTags(Map<String,TemplateTag> templateTags)
Set the tags- Parameters:
templateTags
- tags
-
getTemplateTags
public Map<String,TemplateTag> getTemplateTags()
Tags of the template- Returns:
- tags
-
getObjectTags
public Map<String,Tag> getObjectTags()
Returns the list of object tags for this template- Returns:
-
setObjectTags
public void setObjectTags(Map<String,Tag> objectTags)
Sets the object tags for this template- Parameters:
objectTags
-
-
getSource
public String getSource()
Returns the template source- Returns:
- source
-
setSource
public void setSource(String source)
Sets the source of the template- Parameters:
source
-
-
getChannelSetId
public Integer getChannelSetId()
Get the channelset id- Returns:
- channelset id
-
setChannelSetId
public void setChannelSetId(Integer channelSetId)
Set the channelset id- Parameters:
channelSetId
- channelset id
-
getChannelId
public Integer getChannelId()
Get the channel id- Returns:
- channel id
-
setChannelId
public void setChannelId(Integer channelId)
Set the channel id- Parameters:
channelId
- channel id
-
isMaster
public boolean isMaster()
Get whether this template is a master template- Returns:
- true for master templates, false for localized copies
-
setMaster
public void setMaster(boolean master)
Set true for master templates, false for localized copies- Parameters:
master
- true for master template
-
-