|
|||||||||
| Home >> All >> com >> opencms >> defaults >> [ master overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.defaults.master
Class CmsChannelContent

java.lang.Objectcom.opencms.defaults.A_CmsContentDefinition
com.opencms.defaults.master.CmsChannelContent
- All Implemented Interfaces:
- java.lang.Cloneable, com.opencms.core.I_CmsConstants, com.opencms.template.I_CmsContent, com.opencms.defaults.I_CmsExtendedContentDefinition, com.opencms.boot.I_CmsLogChannels
- public class CmsChannelContent
- extends com.opencms.defaults.A_CmsContentDefinition
- implements com.opencms.template.I_CmsContent, com.opencms.boot.I_CmsLogChannels, com.opencms.defaults.I_CmsExtendedContentDefinition
- extends com.opencms.defaults.A_CmsContentDefinition
This class is the master of several Modules. It carries a lot of generic data-fileds which can be used for a special Module. The module creates a set of methods to support project-integration, history and import - export.
| Field Summary | |
private static java.lang.String |
C_CHANNELNAME_ERRFIELD
|
private static java.lang.String |
C_ERRCODE_EMPTY
|
private static java.lang.String |
C_PARENT_ERRFIELD
|
private static java.lang.String |
C_TABLE_CHANNELID
The name of the "tablekey" for the channel id |
private int |
m_accessflags
The accessflags of the channel |
private com.opencms.file.CmsResource |
m_channel
The resource object that contains the information for the channel |
private java.lang.String |
m_channelId
The channel ID |
private java.lang.String |
m_channelname
The name of the channel |
protected com.opencms.file.CmsObject |
m_cms
The cms-object to get access to the cms-ressources |
private int |
m_groupid
The groupid of the channel |
private java.lang.String |
m_parentchannel
The name of the parent channel |
private java.util.Map |
m_properties
The properties of the channel |
private int |
m_userid
The userid of the channel |
| Fields inherited from class com.opencms.defaults.A_CmsContentDefinition |
|
| Fields inherited from interface com.opencms.boot.I_CmsLogChannels |
C_FLEX_CACHE, C_FLEX_LOADER, C_LOGGING, C_MODULE_CRITICAL, C_MODULE_DEBUG, C_MODULE_INFO, C_OPENCMS_CACHE, C_OPENCMS_CRITICAL, C_OPENCMS_CRONSCHEDULER, C_OPENCMS_DEBUG, C_OPENCMS_ELEMENTCACHE, C_OPENCMS_INFO, C_OPENCMS_INIT, C_OPENCMS_POOL, C_OPENCMS_STATICEXPORT, C_OPENCMS_STREAMING, C_PREPROCESSOR_IS_LOGGING |
| Constructor Summary | |
CmsChannelContent(com.opencms.file.CmsObject cms)
Constructor to create a new contentdefinition. |
|
CmsChannelContent(com.opencms.file.CmsObject cms,
com.opencms.file.CmsResource resource)
Constructor to create a new contentdefinition. |
|
CmsChannelContent(com.opencms.file.CmsObject cms,
java.lang.Integer resourceid)
Constructor to read a existing contentdefinition from the database. |
|
CmsChannelContent(com.opencms.file.CmsObject cms,
java.lang.String resourceid)
Constructor to read a existing contentdefinition from the database. |
|
| Method Summary | |
void |
check()
Plauzibilization method. |
void |
chgrp(com.opencms.file.CmsObject cms,
int group)
Change group method for changing permissions of content definition |
void |
chmod(com.opencms.file.CmsObject cms,
int accessflags)
Change access flags method for changing permissions of content definition |
void |
chown(com.opencms.file.CmsObject cms,
int owner)
Change owner method for changing permissions of content definition |
int |
copy(com.opencms.file.CmsObject cms)
Copy method for copying content definition |
void |
delete(com.opencms.file.CmsObject cms)
delete method for delete instance of content definition |
int |
getAccessFlags()
Gets the accessflags of the channel |
java.lang.String |
getAccessFlagsAsString()
Convenience method to get the access-Flags as String representation. |
private static void |
getAllResources(com.opencms.file.CmsObject cms,
java.lang.String rootFolder,
java.util.Vector allFolders)
Helper for method getChannelList |
java.lang.String |
getChannelId()
gets the unique channel Id of a content definition instance |
static java.util.Vector |
getChannelList(com.opencms.file.CmsObject cms)
Returns a vector of CD objects, sorted descending by channelname. |
java.lang.String |
getChannelName()
Gets the channelname |
java.lang.String |
getChannelPath()
Gets the channelname |
long |
getDateCreated()
Gets the date of the creation of the channel |
long |
getDateLastModified()
Gets the date of the last modification of the channel |
static java.util.Vector |
getFieldMethods(com.opencms.file.CmsObject cms)
Gets the methods used to display the dava values in the backoffice filelist. |
static java.util.Vector |
getFieldNames(com.opencms.file.CmsObject cms)
Gets the names of the table columns displayed in the backoffice filelist. |
static java.util.Vector |
getFilterMethods(com.opencms.file.CmsObject cms)
Gets the filter methods This method is needed for the abstract backoffice class only. |
java.lang.String |
getGroup()
Gets the groupname |
int |
getGroupId()
Gets the groupid |
java.lang.Integer |
getGroups(com.opencms.file.CmsObject cms,
java.util.Vector names,
java.util.Vector values)
Gets all groups, that may work for a project. |
java.util.Vector |
getHistory(com.opencms.file.CmsObject cms)
history method returns the history of content definition |
int |
getId()
gets the unique Id of a content definition instance |
int |
getLastModifiedBy()
Gets the id of the user who has modified the channel |
java.lang.String |
getLastModifiedByName()
Gets the name of the user who has modified the channel |
int |
getLockedInProject()
Gets the projectId where the CD belongs to. |
int |
getLockstate()
Gets the lockstate. |
int |
getOwner()
Gets the owner of this contentdefinition. |
java.lang.String |
getOwnerName()
Gets the ownername of this contentdefinition. |
java.lang.String |
getParentName()
Gets the name of the parent channel |
int |
getProjectId()
Gets the projectId of a CD. |
int |
getState()
Gets the state of a CD. |
java.lang.String |
getTitle()
Gets the title of the channel |
java.lang.String |
getUniqueId(com.opencms.file.CmsObject cms)
gets the unique Id of a content definition instance |
java.lang.Object |
getVersionFromHistory(com.opencms.file.CmsObject cms,
int versionId)
History method returns the cd of the version with the given versionId |
int |
getVersionId()
Gets the version id of version the channel |
protected void |
initValues()
This method initialises all needed members with default-values. |
static boolean |
isLockable()
This content definition is lockable. |
boolean |
isReadable()
returns true if the CD is readable for the current user |
boolean |
isWriteable()
returns true if the CD is writeable for the current user |
void |
publishResource(com.opencms.file.CmsObject cms)
publish method for publish instance of content definition |
void |
restore(com.opencms.file.CmsObject cms,
int versionId)
restore method for restore instance of content definition from history |
void |
setAccessFlags(int flags)
Sets the accessflags of the channel. |
void |
setAccessFlagsAsString(java.lang.String permissions)
Get the permissions of Channel |
void |
setChannelId(java.lang.String id)
sets the unique channel Id of a content definition instance |
void |
setChannelName(java.lang.String name)
Sets the channelname. |
void |
setGroup(int id)
Sets the group. |
void |
setLockstate(int lockstate)
Sets the lockstates |
private void |
setNewChannelId()
Sets the channelId of a new channel |
void |
setOwner(int id)
Sets the owner of this contentdefinition. |
void |
setParentName(java.lang.String name)
Sets the parentname of the channel. |
void |
setTitle(java.lang.String title)
sets the title of a content definition instance |
java.lang.String |
toString()
Returns a String representation of this instance. |
void |
undelete(com.opencms.file.CmsObject cms)
undelete method for undelete instance of content definition |
void |
write(com.opencms.file.CmsObject cms)
write method to write the current content of the content definition to the database. |
| Methods inherited from class com.opencms.defaults.A_CmsContentDefinition |
accessGroup, accessOther, accessOwner, applyFilter, applyFilter, check, getUrl, hasReadAccess, hasWriteAccess, isExtendedList, isTimedContent, setGroup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
C_TABLE_CHANNELID
private static final java.lang.String C_TABLE_CHANNELID
- The name of the "tablekey" for the channel id
- See Also:
- Constant Field Values
C_CHANNELNAME_ERRFIELD
private static java.lang.String C_CHANNELNAME_ERRFIELD
C_PARENT_ERRFIELD
private static java.lang.String C_PARENT_ERRFIELD
C_ERRCODE_EMPTY
private static java.lang.String C_ERRCODE_EMPTY
m_cms
protected com.opencms.file.CmsObject m_cms
- The cms-object to get access to the cms-ressources
m_channelId
private java.lang.String m_channelId
- The channel ID
m_channel
private com.opencms.file.CmsResource m_channel
- The resource object that contains the information for the channel
m_channelname
private java.lang.String m_channelname
- The name of the channel
m_parentchannel
private java.lang.String m_parentchannel
- The name of the parent channel
m_properties
private java.util.Map m_properties
- The properties of the channel
m_groupid
private int m_groupid
- The groupid of the channel
m_userid
private int m_userid
- The userid of the channel
m_accessflags
private int m_accessflags
- The accessflags of the channel
| Constructor Detail |
CmsChannelContent
public CmsChannelContent(com.opencms.file.CmsObject cms)
- Constructor to create a new contentdefinition. You can set data with your
set-Methods. After you have called the write-method this definition gets
a unique id.
CmsChannelContent
public CmsChannelContent(com.opencms.file.CmsObject cms, java.lang.String resourceid) throws com.opencms.core.CmsException
- Constructor to read a existing contentdefinition from the database. The
data read from the database will be filled into the member-variables.
You can read them with the get- and modify them with the set-methods.
Changes you have made must be written back to the database by calling
the write-method.
CmsChannelContent
public CmsChannelContent(com.opencms.file.CmsObject cms, java.lang.Integer resourceid) throws com.opencms.core.CmsException
- Constructor to read a existing contentdefinition from the database. The
data read from the database will be filled into the member-variables.
You can read them with the get- and modify them with the set-methods.
Changes you have made must be written back to the database by calling
the write-method.
CmsChannelContent
public CmsChannelContent(com.opencms.file.CmsObject cms, com.opencms.file.CmsResource resource)
- Constructor to create a new contentdefinition. You can set data with your
set-Methods. After you have called the write-method this definition gets
a unique id.
| Method Detail |
initValues
protected void initValues()
- This method initialises all needed members with default-values.
delete
public void delete(com.opencms.file.CmsObject cms) throws java.lang.Exception
- delete method
for delete instance of content definition
undelete
public void undelete(com.opencms.file.CmsObject cms) throws java.lang.Exception
- undelete method
for undelete instance of content definition
- Specified by:
undeletein interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
publishResource
public void publishResource(com.opencms.file.CmsObject cms)
- publish method
for publish instance of content definition
- Specified by:
publishResourcein interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
restore
public void restore(com.opencms.file.CmsObject cms, int versionId)
- restore method
for restore instance of content definition from history
- Specified by:
restorein interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
chown
public void chown(com.opencms.file.CmsObject cms, int owner)
- Change owner method
for changing permissions of content definition
- Specified by:
chownin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
chgrp
public void chgrp(com.opencms.file.CmsObject cms, int group)
- Change group method
for changing permissions of content definition
- Specified by:
chgrpin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
chmod
public void chmod(com.opencms.file.CmsObject cms, int accessflags)
- Change access flags method
for changing permissions of content definition
- Specified by:
chmodin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
copy
public int copy(com.opencms.file.CmsObject cms)
- Copy method
for copying content definition
- Specified by:
copyin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
write
public void write(com.opencms.file.CmsObject cms) throws java.lang.Exception
- write method
to write the current content of the content definition to the database.
getUniqueId
public java.lang.String getUniqueId(com.opencms.file.CmsObject cms)
- gets the unique Id of a content definition instance
getId
public int getId()
- gets the unique Id of a content definition instance
- Specified by:
getIdin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getLockedInProject
public int getLockedInProject()
- Gets the projectId where the CD belongs to.
This method is required for the use of the abstract backoffice.
- Specified by:
getLockedInProjectin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getState
public int getState()
- Gets the state of a CD.
This method is required for the use of the abstract backoffice.
- Specified by:
getStatein interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getProjectId
public int getProjectId()
- Gets the projectId of a CD.
This method is required for the use of the abstract backoffice.
- Specified by:
getProjectIdin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getChannelId
public java.lang.String getChannelId()
- gets the unique channel Id of a content definition instance
setChannelId
public void setChannelId(java.lang.String id)
- sets the unique channel Id of a content definition instance
getTitle
public java.lang.String getTitle()
- Gets the title of the channel
- Specified by:
getTitlein interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
setTitle
public void setTitle(java.lang.String title)
- sets the title of a content definition instance
getLockstate
public int getLockstate()
- Gets the lockstate.
setLockstate
public void setLockstate(int lockstate)
- Sets the lockstates
getOwnerName
public java.lang.String getOwnerName()
- Gets the ownername of this contentdefinition.
getOwner
public int getOwner()
- Gets the owner of this contentdefinition.
- Specified by:
getOwnerin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
setOwner
public void setOwner(int id)
- Sets the owner of this contentdefinition.
getGroup
public java.lang.String getGroup()
- Gets the groupname
getGroupId
public int getGroupId()
- Gets the groupid
- Specified by:
getGroupIdin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
setGroup
public void setGroup(int id)
- Sets the group.
getChannelPath
public java.lang.String getChannelPath()
- Gets the channelname
getChannelName
public java.lang.String getChannelName()
- Gets the channelname
setChannelName
public void setChannelName(java.lang.String name)
- Sets the channelname.
setParentName
public void setParentName(java.lang.String name)
- Sets the parentname of the channel.
getParentName
public java.lang.String getParentName()
- Gets the name of the parent channel
setAccessFlags
public void setAccessFlags(int flags)
- Sets the accessflags of the channel.
getAccessFlags
public int getAccessFlags()
- Gets the accessflags of the channel
- Specified by:
getAccessFlagsin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getDateLastModified
public long getDateLastModified()
- Gets the date of the last modification of the channel
- Specified by:
getDateLastModifiedin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getDateCreated
public long getDateCreated()
- Gets the date of the creation of the channel
- Specified by:
getDateCreatedin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getLastModifiedBy
public int getLastModifiedBy()
- Gets the id of the user who has modified the channel
- Specified by:
getLastModifiedByin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getLastModifiedByName
public java.lang.String getLastModifiedByName()
- Gets the name of the user who has modified the channel
- Specified by:
getLastModifiedByNamein interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getVersionId
public int getVersionId()
- Gets the version id of version the channel
- Specified by:
getVersionIdin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getGroups
public java.lang.Integer getGroups(com.opencms.file.CmsObject cms, java.util.Vector names, java.util.Vector values) throws com.opencms.core.CmsException
- Gets all groups, that may work for a project.
The given vectors
namesandvalueswill be filled with the appropriate information to be used for building a select box.
getHistory
public java.util.Vector getHistory(com.opencms.file.CmsObject cms)
- history method
returns the history of content definition
- Specified by:
getHistoryin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
getVersionFromHistory
public java.lang.Object getVersionFromHistory(com.opencms.file.CmsObject cms, int versionId)
- History method
returns the cd of the version with the given versionId
- Specified by:
getVersionFromHistoryin interfacecom.opencms.defaults.I_CmsExtendedContentDefinition
isReadable
public boolean isReadable()
- returns true if the CD is readable for the current user
isWriteable
public boolean isWriteable()
- returns true if the CD is writeable for the current user
toString
public java.lang.String toString()
- Returns a String representation of this instance.
This can be used for debugging purposes.
getAccessFlagsAsString
public java.lang.String getAccessFlagsAsString()
- Convenience method to get the access-Flags as String representation.
setAccessFlagsAsString
public void setAccessFlagsAsString(java.lang.String permissions)
- Get the permissions of Channel
setNewChannelId
private void setNewChannelId()
throws com.opencms.core.CmsException
- Sets the channelId of a new channel
isLockable
public static boolean isLockable()
- This content definition is lockable. This class overwrited the isLockable method of the abstract
backoffice to flag that this content definition uses the lock feature of the backoffice. *
getFieldNames
public static java.util.Vector getFieldNames(com.opencms.file.CmsObject cms)
- Gets the names of the table columns displayed in the backoffice filelist.
This method is needed for the abstract backoffice class only.
getFieldMethods
public static java.util.Vector getFieldMethods(com.opencms.file.CmsObject cms)
- Gets the methods used to display the dava values in the backoffice filelist.
This method is needed for the abstract backoffice class only.
getFilterMethods
public static java.util.Vector getFilterMethods(com.opencms.file.CmsObject cms)
- Gets the filter methods
This method is needed for the abstract backoffice class only.
getChannelList
public static java.util.Vector getChannelList(com.opencms.file.CmsObject cms) throws com.opencms.core.CmsException
- Returns a vector of CD objects, sorted descending by channelname.
This method is needed for the abstract backoffice class only.
getAllResources
private static void getAllResources(com.opencms.file.CmsObject cms, java.lang.String rootFolder, java.util.Vector allFolders) throws com.opencms.core.CmsException
- Helper for method getChannelList
check
public void check()
throws com.opencms.core.exceptions.CmsPlausibilizationException
- Plauzibilization method.
This method checks if all inputfields contain correct input data.
If an input field has no correct data, a CmsPlausibilizationException is thrown.
|
|||||||||
| Home >> All >> com >> opencms >> defaults >> [ master overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC