com.opencms.defaults
Interface I_CmsExtendedContentDefinition

All Known Implementing Classes:
CmsChannelContent, CmsMasterContent

public interface I_CmsExtendedContentDefinition

Content Definitions that uses the projectmanagement, that means the cd can be published and the history can be enabled, should implement this interface


Method Summary
 void chgrp(CmsObject cms, int group)
          Change group method for changing permissions of content definition
 void chmod(CmsObject cms, int accessflags)
          Change access flags method for changing permissions of content definition
 void chown(CmsObject cms, int owner)
          Change owner method for changing permissions of content definition
 int copy(CmsObject cms)
          Copy method for copying content definition
 int getAccessFlags()
          Returns the access flags of the content definition
 long getDateCreated()
          Returns the date of the creation of the content definition
 long getDateLastModified()
          Returns the date of the last modification of the content definition
 int getGroupId()
          Returns the groupId of the content definition
 Vector getHistory(CmsObject cms)
          History method returns the vector of the versions of content definition in the history
 int getId()
          Returns the unique id of the content definition
 int getLastModifiedBy()
          Returns the id of the user who has modified the content definition
 String getLastModifiedByName()
          Returns the name of the user who has modified the content definition
 int getLockedInProject()
          Returns the projectId of the content definition that is stored in the cd table after the cd was locked
 int getOwner()
          Returns the ownerId of the content definition
 int getProjectId()
          Returns the projectId of the content definition.
 int getState()
          Returns the state of the content definition: unchanged, new, changed or deleted
 String getTitle()
          Returns the title of the content definition
 Object getVersionFromHistory(CmsObject cms, int versionId)
          History method returns the cd of the version with the given versionId
 int getVersionId()
          Returns the id of the version in the history of the content definition
 void publishResource(CmsObject cms)
          Publishes the content definition directly
 void restore(CmsObject cms, int versionId)
          Restore method for restore instance of content definition from the history
 void undelete(CmsObject cms)
          Undelete method for undelete instance of content definition
 

Method Detail

getId

public int getId()
Returns the unique id of the content definition

Returns:
int The unique id of the cd

getProjectId

public int getProjectId()
Returns the projectId of the content definition. If the cd belongs to the current project the value is the id of the current project otherwise its the id of the online project

Returns:
int The project id

getState

public int getState()
Returns the state of the content definition: unchanged, new, changed or deleted

Returns:
int The state of the cd

getLockedInProject

public int getLockedInProject()
Returns the projectId of the content definition that is stored in the cd table after the cd was locked

Returns:
int The id of the project

getDateLastModified

public long getDateLastModified()
Returns the date of the last modification of the content definition

Returns:
long The date of the last modification

getDateCreated

public long getDateCreated()
Returns the date of the creation of the content definition

Returns:
long The date of the creation

getLastModifiedBy

public int getLastModifiedBy()
Returns the id of the user who has modified the content definition

Returns:
int The id of the user who has modified the cd

getLastModifiedByName

public String getLastModifiedByName()
Returns the name of the user who has modified the content definition

Returns:
String The name of the user who has modified the cd

getVersionId

public int getVersionId()
Returns the id of the version in the history of the content definition

Returns:
int The id of the version

getTitle

public String getTitle()
Returns the title of the content definition

Returns:
String The title of the cd

getOwner

public int getOwner()
Returns the ownerId of the content definition

Returns:
int The ownerId of the cd

getGroupId

public int getGroupId()
Returns the groupId of the content definition

Returns:
int The groupId of the cd

getAccessFlags

public int getAccessFlags()
Returns the access flags of the content definition

Returns:
int The access flags of the cd

publishResource

public void publishResource(CmsObject cms)
                     throws Exception
Publishes the content definition directly

Parameters:
cms - The CmsObject
Exception

undelete

public void undelete(CmsObject cms)
              throws Exception
Undelete method for undelete instance of content definition

Parameters:
cms - The CmsObject
Exception

restore

public void restore(CmsObject cms,
                    int versionId)
             throws Exception
Restore method for restore instance of content definition from the history

Parameters:
cms - The CmsObject
versionId - The id of the version to restore
Exception

chown

public void chown(CmsObject cms,
                  int owner)
           throws Exception
Change owner method for changing permissions of content definition

Parameters:
cms - The CmsObject
owner - The id of the new owner
Exception

chgrp

public void chgrp(CmsObject cms,
                  int group)
           throws Exception
Change group method for changing permissions of content definition

Parameters:
cms - The CmsObject
group - The id of the new group
Exception

chmod

public void chmod(CmsObject cms,
                  int accessflags)
           throws Exception
Change access flags method for changing permissions of content definition

Parameters:
cms - The CmsObject
accessflags - The new access flags
Exception

copy

public int copy(CmsObject cms)
         throws Exception
Copy method for copying content definition

Parameters:
cms - The CmsObject
Returns:
int The id of the new content definition
Exception

getHistory

public Vector getHistory(CmsObject cms)
                  throws Exception
History method returns the vector of the versions of content definition in the history

Parameters:
cms - The CmsObject
Returns:
Vector The versions of the cd in the history
Exception

getVersionFromHistory

public Object getVersionFromHistory(CmsObject cms,
                                    int versionId)
                             throws Exception
History method returns the cd of the version with the given versionId

Parameters:
cms - The CmsObject
versionId - The version id
Returns:
Object The object with the version of the cd
Exception