|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.file.CmsObject
This class provides access to the OpenCms and its resources.
The CmsObject encapsulates user identification and client requests and
is the central object to transport information in the Cms Servlet.
All operations on the CmsObject are forwarded to the class which extends A_CmsRessourceBroker
to ensure user authentification in all operations.
| Field Summary |
| Constructor Summary | |
CmsObject()
The default constructor. |
|
| Method Summary | |
void |
acceptTask(int taskId)
Accept a task from the Cms. |
boolean |
accessCreate(String resource)
Checks, if the user may create this resource. |
boolean |
accessLock(String resource)
Checks, if the user may lock this resource. |
boolean |
accessProject(int projectId)
Checks if the user can access the project. |
boolean |
accessRead(String resource)
Checks, if the user may read this resource. |
boolean |
accessReadVisible(CmsResource resource)
Checks, if the user may read this resource and if it is visible to him. |
boolean |
accessWrite(String resource)
Checks, if the user may write this resource. |
void |
addFileExtension(String extension,
String resTypeName)
Adds a file extension to the list of known file extensions. |
CmsGroup |
addGroup(String name,
String description,
int flags,
String parent)
Adds a new group to the Cms. |
CmsUser |
addImportUser(String name,
String password,
String recoveryPassword,
String description,
String firstname,
String lastname,
String email,
int flags,
Hashtable additionalInfos,
String defaultGroup,
String address,
String section,
int type)
Adds a user to the Cms by import. |
CmsUser |
addUser(String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
Adds a user to the Cms. |
void |
addUserToGroup(String username,
String groupname)
Adds a user to a group. |
CmsUser |
addWebUser(String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
Adds a web user to the Cms. |
CmsUser |
addWebUser(String name,
String password,
String group,
String additionalGroup,
String description,
Hashtable additionalInfos,
int flags)
Adds a web user to the Cms. |
CmsUser |
anonymousUser()
Returns the anonymous user object. |
void |
backupProject(int projectId,
int versionId,
long publishDate)
Creates a backup of the published project |
void |
changeLockedInProject(int projectId,
String resourcename)
Changes the project-id of a resource to the new project for publishing the resource directly |
void |
changeUserType(int userId,
int userType)
Changes the type of the user |
void |
changeUserType(String username,
int userType)
Changes the type of the user to webusertype |
void |
chgrp(String filename,
String newGroup)
Changes the group of a resource. |
void |
chgrp(String filename,
String newGroup,
boolean chRekursive)
Changes the group of a resource. |
void |
chmod(String filename,
int flags)
Changes the flags of a resource. |
void |
chmod(String filename,
int flags,
boolean chRekursive)
Changes the flags of a resource. |
void |
chown(String filename,
String newOwner)
Changes the owner of a resource. |
void |
chown(String filename,
String newOwner,
boolean chRekursive)
Changes the owner of a resource. |
void |
chtype(String filename,
String newType)
Changes the resourcetype of a resource. |
void |
clearcache()
Clears all internal DB-Caches. |
void |
clearElementCache()
Clears the element cache. |
void |
copyFile(String source,
String destination)
Deprecated. Use copyResource instead. |
void |
copyFolder(String source,
String destination)
Deprecated. Use copyResource instead. |
void |
copyResource(String source,
String destination)
Copies a file. |
void |
copyResource(String source,
String destination,
boolean keepFlags)
Copies a file. |
void |
copyResourceToProject(String resource)
Copies a resource from the online project to a new, specified project. |
int |
countLockedResources(int id)
Counts the locked resources in a project. |
CmsFolder |
createChannel(String parentChannel,
String newChannelName)
Creates a new channel. |
CmsFile |
createFile(String folder,
String filename,
byte[] contents,
String type)
Deprecated. Use createResource instead. |
CmsFile |
createFile(String folder,
String filename,
byte[] contents,
String type,
Hashtable properties)
Deprecated. Use createResource instead. |
CmsFolder |
createFolder(String folder,
String newFolderName)
Deprecated. Use createResource instead. |
void |
createLinkEntrys(int pageId,
Vector linkTargets)
creates a link entry for each of the link targets in the linktable. |
void |
createOnlineLinkEntrys(int pageId,
Vector linkTarget)
creates a link entry for each of the link targets in the online linktable. |
CmsTask |
createProject(String projectname,
int projectType,
String roleName,
long timeout,
int priority)
Creates a new project for task handling. |
CmsProject |
createProject(String name,
String description,
String groupname,
String managergroupname)
Creates a new project. |
CmsProject |
createProject(String name,
String description,
String groupname,
String managergroupname,
int projecttype)
Creates a new project. |
CmsPropertydefinition |
createPropertydefinition(String name,
String resourcetype)
Creates the property-definition for a resource type. |
CmsResource |
createResource(String newResourceName,
String type,
Map properties,
byte[] contents,
Object parameter)
|
CmsResource |
createResource(String folder,
String name,
String type)
|
CmsResource |
createResource(String folder,
String name,
String type,
Map properties)
|
CmsResource |
createResource(String folder,
String name,
String type,
Map properties,
byte[] contents)
|
CmsTask |
createTask(int projectid,
String agentName,
String roleName,
String taskname,
String taskcomment,
int tasktype,
long timeout,
int priority)
Creates a new task. |
CmsTask |
createTask(String agentName,
String roleName,
String taskname,
String taskcomment,
long timeout,
int priority)
Creates a new task. |
CmsProject |
createTempfileProject()
Creates a new project for the temporary files. |
void |
deleteAllProperties(String resourcename)
Deletes all properties for a file or folder. |
int |
deleteBackups(int weeks)
Deletes the versions from the backup tables that are older then the given weeks |
void |
deleteEmptyFolder(String foldername)
Deletes a folder. |
void |
deleteExportLink(CmsExportLink link)
Deletes an exportlink in the database. |
void |
deleteExportLink(String link)
Deletes an exportlink in the database. |
void |
deleteFile(String filename)
Deprecated. Use deleteResource instead. |
void |
deleteFolder(String foldername)
Deprecated. Use deleteResource instead. |
void |
deleteGroup(String delgroup)
Deletes a group. |
void |
deleteLinkEntrys(int pageId)
deletes all entrys in the link table that belong to the pageId |
void |
deleteOnlineLinkEntrys(int pageId)
deletes all entrys in the online link table that belong to the pageId |
void |
deleteProject(int id)
Deletes a project. |
void |
deleteProperty(String resourcename,
String property)
Deletes a property for a file or folder. |
void |
deletePropertydefinition(String name,
String resourcetype)
Deletes the property-definition for a resource type. |
void |
deleteResource(String filename)
Deletes a resource. |
void |
deleteUser(int userId)
Deletes a user from the Cms. |
void |
deleteUser(String username)
Deletes a user from the Cms. |
void |
deleteWebUser(int userId)
Deletes a web user from the Cms. |
void |
destroy()
Destroys the resource borker and required modules and connections. |
String |
digest(String value)
Method to encrypt the passwords. |
protected void |
doChangeLockedInProject(int projectId,
String resourcename)
Changes the project-id of a resource to the new project for publishing the resource directly |
protected void |
doChgrp(String filename,
String newGroup)
Changes the group of a resource. |
protected void |
doChmod(String filename,
int flags)
Changes the flags of a resource. |
protected void |
doChown(String filename,
String newOwner)
Changes the owner of a resource. |
protected void |
doChtype(String filename,
String newType)
Changes the resourcetype of a resource. |
protected void |
doCopyFile(String source,
String destination)
Copies a file. |
protected void |
doCopyFolder(String source,
String destination)
Copies a folder. |
protected void |
doCopyResourceToProject(String resource)
Copies a resource from the online project to a new, specified project. |
protected CmsFile |
doCreateFile(String newFileName,
byte[] contents,
String type)
Creates a new file with the given content and resourcetype. |
protected CmsFile |
doCreateFile(String newFileName,
byte[] contents,
String type,
Map properties)
Creates a new file with the given content and resourcetype. |
protected CmsFolder |
doCreateFolder(String newFolderName,
Map properties)
Creates a new folder. |
protected CmsFolder |
doCreateFolder(String folder,
String newFolderName)
Creates a new folder. |
int |
doDecrementLinkCountForResource(String theResourceName)
Decrement the VFS link counter for a resource. |
protected void |
doDeleteFile(String filename)
Deletes a file. |
protected void |
doDeleteFolder(String foldername)
Deletes a folder. |
protected CmsResource |
doImportResource(String newResourceName,
int resourceType,
Map properties,
int launcherType,
String launcherClassname,
String ownername,
String groupname,
int accessFlags,
long lastmodified,
byte[] filecontent)
Creates a new resource. |
int |
doIncrementLinkCountForResource(String theResourceName)
Increment the VFS link counter for a resource. |
protected void |
doLockResource(String resource,
boolean force)
Locks a given resource. |
protected void |
doMoveFile(String source,
String destination)
Moves a file to the given destination. |
protected void |
doRenameFile(String oldname,
String newname)
Renames the resource to the new name. |
protected void |
doRestoreResource(int versionId,
String filename)
Restores a file in the current project with a version in the backup |
protected void |
doTouch(String resourceName,
long timestamp)
Access the resource broker underneath to change the timestamp of a resource. |
protected void |
doUndeleteFile(String filename)
Undeletes a file. |
protected void |
doUndeleteFolder(String foldername)
Undeletes a folder. |
protected void |
doUndoChanges(String resource)
Undo changes in a file. |
protected void |
doUnlockResource(String resource)
Unlocks a resource. |
protected void |
doWriteResource(String resourcename,
Map properties,
String username,
String groupname,
int accessFlags,
int resourceType,
byte[] filecontent)
Writes a resource and its properties to the Cms. |
void |
endTask(int taskid)
Ends a task of the Cms. |
void |
exportModuledata(String exportFile,
String[] exportChannels,
String[] exportModules,
I_CmsReport report)
Exports channels and moduledata to zip. |
CmsFile |
exportResource(CmsFile file)
Exports a resource. |
void |
exportResources(String exportFile,
String[] exportPaths)
Exports cms-resources to a zip-file. |
void |
exportResources(String exportFile,
String[] exportPaths,
boolean includeSystem,
boolean excludeUnchanged)
Exports cms-resources to a zip-file. |
void |
exportResources(String exportFile,
String[] exportPaths,
boolean includeSystem,
boolean excludeUnchanged,
boolean exportUserdata)
Exports cms-resources to a zip-file. |
void |
exportResources(String exportFile,
String[] exportPaths,
boolean includeSystem,
boolean excludeUnchanged,
boolean exportUserdata,
long contentAge,
I_CmsReport report)
Exports cms-resources to a zip-file. |
void |
exportStaticResources(Vector linksToExport)
Creates a static export in the filesystem. |
void |
exportStaticResources(Vector startpoints,
Vector projectResources,
Vector allExportedLinks,
CmsPublishedResources changedResources,
I_CmsReport report)
Creates a static export in the filesystem |
ArrayList |
fetchVfsLinksForResource(String theResourceName)
Fetches the resource names of all VFS links pointing to a given resource as an ArrayList. |
void |
forwardTask(int taskid,
String newRoleName,
String newUserName)
Forwards a task to a new user. |
Vector |
getAllAccessibleProjects()
Returns all projects, which the current user can access. |
Vector |
getAllBackupProjects()
Returns a Vector with all projects from history |
Vector |
getAllExportLinks()
Returns a Vector with all export links |
Vector |
getAllManageableProjects()
Returns all projects which are owned by the current user or which are manageable for the group of the user. |
Hashtable |
getAllResourceTypes()
Returns a Hashtable with all I_CmsResourceTypes. |
int |
getBackupVersionId()
Get the next version id for the published backup resources |
void |
getBrokenLinks(int projectId,
I_CmsReport report,
Vector changed,
Vector deleted,
Vector newRes)
checks a project for broken links that would appear if the project is published. |
Hashtable |
getCacheInfo()
Gets information about the cache size. |
Vector |
getChild(String groupname)
Returns all child groups of a group. |
Vector |
getChilds(String groupname)
Returns all child groups of a group. |
CmsObject |
getCmsObjectForStaticExport(CmsExportRequest dReq,
CmsExportResponse dRes)
Creates a special CmsObject for the static export. |
source.org.apache.java.util.Configurations |
getConfigurations()
Gets the configurations of the properties-file. |
Vector |
getDependingExportLinks(Vector res)
Reads all export links that depend on the resource. |
Vector |
getDirectGroupsOfUser(String username)
Gets all groups to which a given user directly belongs. |
Vector |
getFilesInFolder(String foldername)
Returns a Vector with all files of a given folder. |
Vector |
getFilesInFolder(String foldername,
boolean includeDeleted)
Returns a Vector with all files of a given folder. |
Vector |
getFilesWithProperty(String propertyDefinition,
String propertyValue)
Returns a Vector with all resource-names of the resources that have set the given property to the given value. |
long |
getFileSystemChanges()
This method can be called, to determine if the file-system was changed in the past. |
long |
getFileSystemFolderChanges()
This method can be called, to determine if the file-system was changed in the past. |
Vector |
getFolderTree()
Returns a Vector with the complete folder-tree for this project. |
Vector |
getGroups()
Returns all groups in the Cms. |
Vector |
getGroupsOfUser(String username)
Gets all groups of a user. |
CmsLauncherManager |
getLauncherManager()
Get the launcher manager used with this instance of CmsObject. |
int |
getLimitedWorkplacePort()
This is the port the workplace access is limited to. |
String |
getLinkSubstitution(String link)
Replaces the link according to the rules and registers it to the requestcontex if we are in export modus. |
Vector |
getLoggedInUsers()
Returns a list of all currently logged in users. |
int |
getMode()
Returns the mode this cmsObject is runnig in. |
Vector |
getOnlineBrokenLinks()
serches for broken links in the online project. |
CmsElementCache |
getOnlineElementCache()
Gets the ElementCache used for the online project. |
CmsPageLinks |
getPageLinks(String page)
extracts the links of the page and returns them in a CmsPageLinks object. |
CmsGroup |
getParent(String groupname)
Returns the parent group of a group. |
String |
getReadingpermittedGroup(int projectId,
String resource)
Checks which Group can read the resource and all the parent folders. |
I_CmsRegistry |
getRegistry()
Gets the Registry. |
CmsRequestContext |
getRequestContext()
Returns the current request-context. |
Vector |
getResourcesInFolder(String folder)
Returns a Vector with the subresources for a folder. |
Vector |
getResourcesWithProperty(String propertyDefinition)
Returns a Vector with all resources of the given type that have set the given property. |
Vector |
getResourcesWithProperty(String propertyDefinition,
String propertyValue,
int resourceType)
Returns a Vector with all resources of the given type that have set the given property to the given value. |
I_CmsResourceType |
getResourceType(int resourceType)
Returns a I_CmsResourceType. |
I_CmsResourceType |
getResourceType(String resourceType)
Returns a I_CmsResourceType. |
String |
getSiteName()
Returns the name of the current site, e.g. |
String |
getSiteRoot(String resourcename)
Returns the name of the current site root, e.g. |
static CmsStaticExportProperties |
getStaticExportProperties()
Returns the properties for the static export. |
Vector |
getSubFolders(String foldername)
Returns a Vector with all subfolders of a given folder. |
Vector |
getSubFolders(String foldername,
boolean includeDeleted)
Returns a Vector with all subfolders of a given folder. |
String |
getTaskPar(int taskid,
String parname)
Get a parameter value for a task. |
int |
getTaskType(String taskname)
Get the template task id fo a given taskname. |
Vector |
getUsers()
Returns all users in the Cms. |
Vector |
getUsers(int type)
Returns all users of the given type in the Cms. |
Vector |
getUsers(int type,
String namefilter)
Returns all users from a given type that start with a specified string |
Vector |
getUsersByLastname(String Lastname,
int UserType,
int UserStatus,
int wasLoggedIn,
int nMax)
Gets all users with a certain Lastname. |
Vector |
getUsersOfGroup(String groupname)
Gets all users of a group. |
Hashtable |
getVariantDependencies()
Gets the hashtable with the variant dependencies used for the elementcache. |
Vector |
getVisibleResourcesWithProperty(String propertyDefinition,
String propertyValue,
int resourceType)
Returns a Vector with all resources of the given type that have set the given property to the given value. |
void |
importFolder(String importFile,
String importPath)
Imports a import-resource (folder or zipfile) to the cms. |
CmsResource |
importResource(String source,
String destination,
String type,
String user,
String group,
String access,
long lastmodified,
Map properties,
String launcherStartClass,
byte[] content,
String importPath)
Imports a resource to the cms. |
void |
importResources(String importFile,
String importPath)
Imports a import-resource (folder or zip-file) to the cms. |
void |
importResources(String importFile,
String importPath,
I_CmsReport report)
Imports a import-resource (folder or zip-file) to the cms. |
void |
init(I_CmsResourceBroker broker)
Initializes the CmsObject without a request-context (current-user, current-group, current-project). |
void |
init(I_CmsResourceBroker broker,
I_CmsRequest req,
I_CmsResponse resp,
String user,
String currentGroup,
int currentProjectId,
boolean streaming,
CmsElementCache elementCache,
CmsCoreSession sessionStorage,
CmsResourceTranslator directoryTranslator,
CmsResourceTranslator fileTranslator)
Initializes the CmsObject for each request. |
boolean |
isAdmin()
Checks, if the users current group is the admin-group. |
boolean |
isHistoryEnabled()
Check if the history is enabled |
boolean |
isManagerOfProject()
Checks, if the user has management access to the project. |
ArrayList |
joinLinksToTargets()
Joins all links with their targets for the current project. |
ArrayList |
joinLinksToTargets(CmsProject theProject)
Joins all links with their targets for a given project. |
ArrayList |
joinLinksToTargets(CmsProject theProject,
I_CmsReport theReport)
Joins all VFS links with their target resources for a given project, printing the output to the given report. |
ArrayList |
joinLinksToTargets(CmsUser theUser,
CmsProject theProject,
I_CmsReport theReport)
Joins all VFS links with their target resources for a given project, printing the output to the given report. |
ArrayList |
joinLinksToTargets(I_CmsReport theReport)
Joins all VFS links with their target resources for the current project, printing the output to the specified report. |
void |
linkResourceToTarget(String theLinkResourceName,
String theTargetResourceName)
Save the ID of the target resource for a VFS link. |
CmsUser |
lockedBy(CmsResource resource)
Returns the user, who has locked a given resource. |
CmsUser |
lockedBy(String resource)
Returns the user, who has locked a given resource. |
void |
lockResource(String resource)
Locks the given resource. |
void |
lockResource(String resource,
boolean force)
Locks a given resource. |
String |
loginUser(String username,
String password)
Logs a user into the Cms, if the password is correct. |
String |
loginWebUser(String username,
String password)
Logs a web user into the Cms, if the password is correct. |
void |
moveFile(String source,
String destination)
Deprecated. Use moveResource instead. |
void |
moveResource(String source,
String destination)
Moves a resource to the given destination. |
CmsProject |
onlineProject()
Returns the online project. |
void |
publishProject(int id)
Publishes a project. |
void |
publishProject(int id,
I_CmsReport report)
Publishes a project. |
void |
publishResource(String resourcename)
Publishes a single resource. |
int |
publishResource(String resourcename,
boolean justPrepare)
Publishes a single resource. |
int |
publishResource(String resourcename,
boolean justPrepare,
I_CmsReport report)
|
CmsUser |
readAgent(CmsTask task)
Reads the agent of a task from the OpenCms. |
Vector |
readAllFileHeaders(String filename)
Deprecated. For reading the file history use method readAllFileHeadersForHist |
Vector |
readAllFileHeadersForHist(String filename)
Reads all file headers of a file in the OpenCms. |
Vector |
readAllProjectResources(int projectId)
select all projectResources from an given project |
Hashtable |
readAllProperties(String resource)
Deprecated. use readProperties(String) instead |
Vector |
readAllPropertydefinitions(int resourceType)
Reads all property-definitions for the given resource type. |
Vector |
readAllPropertydefinitions(String resourcetype)
Reads all property-definitions for the given resource type. |
CmsBackupProject |
readBackupProject(int versionId)
Reads a project from the Cms. |
String |
readCronTable()
Gets the Crontable. |
CmsExportLink |
readExportLink(String request)
Reads a exportrequest from the Cms. |
CmsExportLink |
readExportLinkHeader(String request)
Reads a exportrequest without the dependencies from the Cms. |
String |
readExportPath()
Reads the export-path of the system. |
CmsFile |
readFile(String filename)
Reads a file from the Cms. |
CmsFile |
readFile(String filename,
boolean includeDeleted)
Reads a file from the Cms. |
CmsFile |
readFile(String folder,
String filename)
Reads a file from the Cms. |
Hashtable |
readFileExtensions()
Gets the known file extensions (=suffixes). |
CmsBackupResource |
readFileForHist(String filename,
int versionId)
Reads a file from the Cms for history. |
CmsResource |
readFileHeader(String filename)
Reads a file header from the Cms. |
CmsResource |
readFileHeader(String filename,
boolean includeDeleted)
Reads a file header from the Cms. |
CmsResource |
readFileHeader(String filename,
int projectId)
Reads a file header from the Cms. |
CmsResource |
readFileHeader(String folder,
String filename)
Reads a file header from the Cms. |
CmsResource |
readFileHeaderForHist(String filename,
int versionId)
Reads a file header from the Cms for history. |
Vector |
readFileHeaders(int projectId)
Reads all file headers of a project from the Cms. |
Vector |
readFilesByType(int projectId,
int resourcetype)
Reads all files from the Cms, that are of the given type. |
CmsFolder |
readFolder(int folderid,
boolean includeDeleted)
Reads a folder from the Cms. |
CmsFolder |
readFolder(String folderName)
Reads a folder from the Cms. |
CmsFolder |
readFolder(String folderName,
boolean includeDeleted)
Reads a folder from the Cms. |
Vector |
readGivenTasks(int projectId,
String ownerName,
int taskType,
String orderBy,
String sort)
Reads all given tasks from a user for a project. |
CmsGroup |
readGroup(CmsProject project)
Reads the group of a project from the OpenCms. |
CmsGroup |
readGroup(CmsResource resource)
Reads the group of a resource from the Cms. |
CmsGroup |
readGroup(CmsTask task)
Reads the group (role) of a task from the Cms. |
CmsGroup |
readGroup(int groupid)
Reads a group of the Cms. |
CmsGroup |
readGroup(String groupname)
Reads a group of the Cms. |
Hashtable |
readLinkCheckTable()
Gets the Linkchecktable. |
Vector |
readLinkEntrys(int pageId)
returns a Vector (Strings) with the link destinations of all links on the page with the pageId. |
CmsGroup |
readManagerGroup(CmsProject project)
Reads the managergroup of a project from the Cms. |
Hashtable |
readMimeTypes()
Gets all Mime-Types known by the system. |
Vector |
readOnlineLinkEntrys(int pageId)
returns a Vector (Strings) with the link destinations of all links on the page with the pageId. |
CmsUser |
readOriginalAgent(CmsTask task)
Reads the original agent of a task from the Cms. |
CmsUser |
readOwner(CmsProject project)
Reads the owner of a project from the Cms. |
CmsUser |
readOwner(CmsResource resource)
Reads the owner of a resource from the Cms. |
CmsUser |
readOwner(CmsTask task)
Reads the owner (initiator) of a task from the Cms. |
CmsUser |
readOwner(CmsTaskLog log)
Reads the owner of a tasklog from the Cms. |
CmsProject |
readProject(CmsResource res)
Reads a project from the Cms. |
CmsProject |
readProject(CmsTask task)
Reads a project from the Cms. |
CmsProject |
readProject(int id)
Reads a project from the Cms. |
Vector |
readProjectLogs(int projectId)
Reads log entries for a project. |
Vector |
readProjectView(int projectId,
String filter)
Reads all file headers of a project from the Cms. |
Map |
readProperties(String resource)
Looks up all properties for a resource. |
Map |
readProperties(String resource,
boolean search)
Looks up all properties for a resource with optional direcory upward cascading. |
String |
readProperty(String resource,
String property)
Looks up a specified property from a resource. |
String |
readProperty(String resource,
String property,
boolean search)
Looks up a specified property with optional direcory upward cascading. |
String |
readProperty(String resource,
String property,
boolean search,
String propertyDefault)
Looks up a specified property with optional direcory upward cascading, a default value will be returned if the property is not found on the resource (or it's parent folders in case search is set to true). |
CmsPropertydefinition |
readPropertydefinition(String name,
String resourcetype)
Reads the property-definition for the resource type. |
Vector |
readResourcesLikeName(String resourcename)
Returns a Vector with the resources that contains the given part in the resourcename. |
CmsTask |
readTask(int id)
Reads the task with the given id. |
Vector |
readTaskLogs(int taskid)
Reads log entries for a task. |
Vector |
readTasksForProject(int projectId,
int tasktype,
String orderBy,
String sort)
Reads all tasks for a project. |
Vector |
readTasksForRole(int projectId,
String roleName,
int tasktype,
String orderBy,
String sort)
Reads all tasks for a role in a project. |
Vector |
readTasksForUser(int projectId,
String userName,
int tasktype,
String orderBy,
String sort)
Reads all tasks for a user in a project. |
CmsUser |
readUser(int id)
Returns a user in the Cms. |
CmsUser |
readUser(String username)
Returns a user in the Cms. |
CmsUser |
readUser(String username,
int type)
Returns a user in the Cms. |
CmsUser |
readUser(String username,
String password)
Returns a user in the Cms, if the password is correct. |
CmsUser |
readWebUser(String username)
Returns a user object if the password for the user is correct. |
CmsUser |
readWebUser(String username,
String password)
Returns a user object if the password for the user is correct. |
void |
reaktivateTask(int taskId)
Reactivates a task from the Cms. |
void |
recoverPassword(String username,
String recoveryPassword,
String newPassword)
Sets a new password if the user knows his recovery-password. |
void |
removeUserFromGroup(String username,
String groupname)
Removes a user from a group. |
void |
renameFile(String oldname,
String newname)
Deprecated. Use renameResource instead. |
void |
renameResource(String oldname,
String newname)
Renames the resource to the new name. |
void |
replaceResource(String filename,
String type,
Hashtable newProperties,
byte[] newContent)
Replaces and existing resource by another file with different content and different file type. |
void |
restoreResource(int versionId,
String filename)
Restores a file in the current project with a version in the backup |
CmsFolder |
rootFolder()
Returns the root-folder object. |
void |
sendBroadcastMessage(String message)
Returns a list of all currently logged in users. |
void |
setContextTo(String name)
Sets the name of the current site root |
void |
setContextToCos()
Sets the name of the current site root of the content objects system |
void |
setContextToVfs()
Sets the name of the current site root of the virtual file system |
void |
setLauncherManager(CmsLauncherManager newM_launcherManager)
Set the launcher manager used with this instance of CmsObject. |
void |
setMode(int mode)
Sets the mode this CmsObject runs in. |
void |
setName(int taskId,
String name)
Set a new name for a task. |
void |
setParentGroup(String groupName,
String parentGroupName)
Sets a new parent-group for an already existing group in the Cms. |
void |
setPassword(String username,
String newPassword)
Sets the password for a user. |
void |
setPassword(String username,
String oldPassword,
String newPassword)
Sets the password for a user. |
void |
setPriority(int taskId,
int priority)
Sets the priority of a task. |
void |
setRecoveryPassword(String username,
String oldPassword,
String newPassword)
Sets the recovery password for a user. |
void |
setTaskPar(int taskid,
String parname,
String parvalue)
Set a parameter for a task. |
void |
setTimeout(int taskId,
long timeout)
Sets the timeout of a task. |
void |
syncFolder(String resourceName)
Synchronize cms-resources on virtual filesystem with the server filesystem. |
void |
touch(String resourceName,
long timestamp,
boolean touchRecursive)
Change the timestamp of a resource. |
void |
undeleteResource(String filename)
Undeletes a resource. |
void |
undoChanges(String filename)
Undo changes in a file by copying the online file. |
void |
unlockProject(int id)
Unlocks all resources of a project. |
void |
unlockResource(String resource)
Unlocks a resource. |
void |
updateOnlineProjectLinks(Vector deleted,
Vector changed,
Vector newRes,
int pageType)
When a project is published this method aktualises the online link table. |
boolean |
userInGroup(String username,
String groupname)
Tests, if a user is member of the given group. |
void |
writeCronTable(String crontable)
Writes the Crontable. |
void |
writeExportLink(CmsExportLink link)
Writes an exportlink to the Cms. |
void |
writeExportLinkProcessedState(CmsExportLink link)
Sets one exportLink to procecced. |
void |
writeExportPath(String path)
Writes the export-path for the system. |
void |
writeFile(CmsFile file)
Writes a file to the Cms. |
void |
writeFileExtensions(Hashtable extensions)
Writes the file extensions. |
void |
writeFileHeader(CmsFile file)
Writes a file-header to the Cms. |
void |
writeGroup(CmsGroup group)
Writes an already existing group to the Cms. |
void |
writeLinkCheckTable(Hashtable linkchecktable)
Writes the Linkchecktable. |
void |
writeProperties(String name,
Map properties)
Writes a couple of Properties for a file or folder. |
void |
writeProperty(String name,
String property,
String value)
Writes a property for a file or folder. |
CmsPropertydefinition |
writePropertydefinition(CmsPropertydefinition definition)
Deprecated. Do not use this method any longer because there is no type of propertydefinition |
void |
writeTaskLog(int taskid,
String comment)
Writes a new user tasklog for a task. |
void |
writeTaskLog(int taskid,
String comment,
int taskType)
Writes a new user tasklog for a task. |
void |
writeUser(CmsUser user)
Updates the user information. |
void |
writeWebUser(CmsUser user)
Updates the user information of a web user. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CmsObject()
| Method Detail |
public void acceptTask(int taskId)
throws CmsException
CmsException - if operation was not successful.
public boolean accessCreate(String resource)
throws CmsException
resource - the resource to check.
true if the user has the appropriate rigths to create the resource; false otherwise
CmsException - if operation was not successful.
public boolean accessLock(String resource)
throws CmsException
resource - the resource to check.
true if the user has the appropriate rights to lock this resource; false otherwise
CmsException - if operation was not successful.
public boolean accessProject(int projectId)
throws CmsException
projectId - the id of the project.
true, if the user may access this project; false otherwise
CmsException - if operation was not successful.
public boolean accessRead(String resource)
throws CmsException
resource - The resource to check.
true, if the user has the appropriate rigths to read the resource; false otherwise.
CmsException - if operation was not successful.
public boolean accessWrite(String resource)
throws CmsException
resource - the resource to check.
true, if the user has the appropriate rigths to write the resource; false otherwise.
CmsException - if operation was not successful.
public void addFileExtension(String extension,
String resTypeName)
throws CmsException
Security: Only members of the group administrators are allowed to add a file extension.
extension - a file extension like "html","txt" etc.resTypeName - name of the resource type associated with the extension.
CmsException - if operation was not successful.
public CmsGroup addGroup(String name,
String description,
int flags,
String parent)
throws CmsException
Security: Only members of the group administrators are allowed to add a new group.
name - the name of the new groupdescription - the description of the new groupflags - the flags for the new groupparent - the parent group
CmsGroup object representing the newly created group.
CmsException - if operation was not successful.
public CmsUser addUser(String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
throws CmsException
Security: Only members of the group administrators are allowed to add a user.
name - the new name for the user.password - the new password for the user.group - the default groupname for the user.description - the description for the user.additionalInfos - a Hashtable with additional infos for the user. These
Infos may be stored into the Usertables (depending on the implementation).flags - the flags for a user (e.g. C_FLAG_ENABLED).
CmsUser object representing the added user.
CmsException - if operation was not successful.
public CmsUser addImportUser(String name,
String password,
String recoveryPassword,
String description,
String firstname,
String lastname,
String email,
int flags,
Hashtable additionalInfos,
String defaultGroup,
String address,
String section,
int type)
throws CmsException
Security: Only members of the group administrators are allowed to add a user.
name - the new name for the user.password - the new password for the user.recoveryPassword - the new password for the user.description - the description for the user.firstname - the firstname of the user.lastname - the lastname of the user.email - the email of the user.flags - the flags for a user (e.g. C_FLAG_ENABLED).additionalInfos - a Hashtable with additional infos for the user. These
Infos may be stored into the Usertables (depending on the implementation).defaultGroup - the default groupname for the user.address - the address of the user.section - the section of the user.type - the type of the user.
CmsUser object representing the added user.
CmsException - if operation was not successful.
public void addUserToGroup(String username,
String groupname)
throws CmsException
Security: Only members of the group administrators are allowed to add a user to a group.
username - the name of the user that is to be added to the group.groupname - the name of the group.
CmsException - if operation was not successful.
public CmsUser addWebUser(String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
throws CmsException
name - the new name for the user.password - the new password for the user.group - the default groupname for the user.description - the description for the user.additionalInfos - a Hashtable with additional infos for the user. These
Infos may be stored into the Usertables (depending on the implementation).flags - the flags for a user (e.g. C_FLAG_ENABLED)
CmsUser object representing the newly created user.
CmsException - if operation was not successful.
public CmsUser addWebUser(String name,
String password,
String group,
String additionalGroup,
String description,
Hashtable additionalInfos,
int flags)
throws CmsException
name - the new name for the user.password - the new password for the user.group - the default groupname for the user.additionalGroup - An additional group for the user.description - the description for the user.additionalInfos - a Hashtable with additional infos for the user. These
Infos may be stored into the Usertables (depending on the implementation).flags - the flags for a user (e.g. C_FLAG_ENABLED)
CmsUser object representing the newly created user.
CmsException - if operation was not successful.
public CmsUser anonymousUser()
throws CmsException
CmsUser object representing the anonymous user.
CmsException - if operation was not successful.
public void chgrp(String filename,
String newGroup)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newGroup - the name of the new group for this resource.
CmsException - if operation was not successful.
public void chgrp(String filename,
String newGroup,
boolean chRekursive)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newGroup - the name of the new group for this resource.chRekursive - shows if the subResources (of a folder) should be changed too.
CmsException - if operation was not successful.
protected void doChgrp(String filename,
String newGroup)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newGroup - the name of the new group for this resource.
CmsException - if operation was not successful.
public void chmod(String filename,
int flags)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.flags - the new flags for the resource.
CmsException - if operation was not successful.
for this resource.
public void chmod(String filename,
int flags,
boolean chRekursive)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.flags - the new flags for the resource.chRekursive - shows if the subResources (of a folder) should be changed too.
CmsException - if operation was not successful.
for this resource.
protected void doChmod(String filename,
int flags)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.flags - the new flags for the resource.
CmsException - if operation was not successful.
for this resource.
public void chown(String filename,
String newOwner)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newOwner - the name of the new owner for this resource.
CmsException - if operation was not successful.
public void chown(String filename,
String newOwner,
boolean chRekursive)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newOwner - the name of the new owner for this resource.chRekursive - shows if the subResources (of a folder) should be changed too.
CmsException - if operation was not successful.
protected void doChown(String filename,
String newOwner)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newOwner - the name of the new owner for this resource.
CmsException - if operation was not successful.
public void chtype(String filename,
String newType)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newType - the name of the new resourcetype for this resource.
CmsException - if operation was not successful.
protected void doChtype(String filename,
String newType)
throws CmsException
Security: Access is granted, if:
filename - the complete path to the resource.newType - the name of the new resourcetype for this resource.
CmsException - if operation was not successful.public void clearcache()
public void clearElementCache()
public void copyResource(String source,
String destination)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfolder.
CmsException - if the file couldn't be copied, or the user
has not the appropriate rights to copy the file.
public void copyResource(String source,
String destination,
boolean keepFlags)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfolder.keepFlags - true if the copy should keep the source file's flags,
false if the copy should get the user's default flags.
CmsException - if the file couldn't be copied, or the user
has not the appropriate rights to copy the file.
protected void doCopyFile(String source,
String destination)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfolder.
CmsException - if the file couldn't be copied, or the user
has not the appropriate rights to copy the file.
protected void doCopyFolder(String source,
String destination)
throws CmsException
source - the complete path of the sourcefolder.destination - the complete path of the destinationfolder.
CmsException - if the folder couldn't be copied, or if the
user has not the appropriate rights to copy the folder.
public void copyFile(String source,
String destination)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfolder.
CmsException - if the file couldn't be copied, or the user
has not the appropriate rights to copy the file.
public void copyFolder(String source,
String destination)
throws CmsException
source - the complete path of the sourcefolder.destination - the complete path of the destinationfolder.
CmsException - if the folder couldn't be copied, or if the
user has not the appropriate rights to copy the folder.
public void copyResourceToProject(String resource)
throws CmsException
resource - the name of the resource.
CmsException - if operation was not successful.
protected void doCopyResourceToProject(String resource)
throws CmsException
resource - the name of the resource.
CmsException - if operation was not successful.
public int countLockedResources(int id)
throws CmsException
id - the id of the project
CmsException - if operation was not successful.
public CmsFile createFile(String folder,
String filename,
byte[] contents,
String type)
throws CmsException
folder - the complete path to the folder in which the file will be created.filename - the name of the new file.contents - the contents of the new file.type - the resourcetype of the new file.
CmsFile object representing the newly created file.
if - the resourcetype is set to folder. The CmsException is also thrown, if the
filename is not valid or if the user has not the appropriate rights to create a new file.
CmsException
public CmsFile createFile(String folder,
String filename,
byte[] contents,
String type,
Hashtable properties)
throws CmsException
folder - the complete path to the folder in which the file will be created.filename - the name of the new file.contents - the contents of the new file.type - the resourcetype of the new file.properties - A Hashtable of properties, that should be set for this file.
The keys for this Hashtable are the names for properties, the values are
the values for the properties.
CmsFile object representing the newly created file.
CmsException - or if the resourcetype is set to folder.
The CmsException is also thrown, if the filename is not valid or if the user
has not the appropriate rights to create a new file.
public void replaceResource(String filename,
String type,
Hashtable newProperties,
byte[] newContent)
throws CmsException
filename - the resource to replacetype - the type of the new resourcenewContent - the content of the new resource
CmsException
public CmsFolder createFolder(String folder,
String newFolderName)
throws CmsException
folder - the complete path to the folder in which the new folder
will be created.newFolderName - the name of the new folder.
CmsFolder object representing the newly created folder.
CmsException - if the foldername is not valid, or if the user has not the appropriate rights to create
a new folder.
public CmsFolder createChannel(String parentChannel,
String newChannelName)
throws CmsException
parentChannel - the complete path to the channel in which the new channel
will be created.newChannelName - the name of the new channel.
CmsFolder object representing the newly created channel.
CmsException - if the channelname is not valid, or if the user has not the appropriate rights to create
a new channel.
public CmsResource createResource(String folder,
String name,
String type)
throws CmsException
CmsException
public CmsResource createResource(String folder,
String name,
String type,
Map properties)
throws CmsException
CmsException
public CmsResource createResource(String folder,
String name,
String type,
Map properties,
byte[] contents)
throws CmsException
CmsException
public CmsResource createResource(String newResourceName,
String type,
Map properties,
byte[] contents,
Object parameter)
throws CmsException
CmsException
protected CmsFile doCreateFile(String newFileName,
byte[] contents,
String type)
throws CmsException
contents - the contents of the new file.type - the resourcetype of the new file.
CmsFile object representing the newly created file.
CmsException - if the resourcetype is set to folder. The CmsException is also thrown, if the
filename is not valid or if the user has not the appropriate rights to create a new file.
protected CmsFile doCreateFile(String newFileName,
byte[] contents,
String type,
Map properties)
throws CmsException
contents - the contents of the new file.type - the resourcetype of the new file.properties - A Hashtable of properties, that should be set for this file.
The keys for this Hashtable are the names for properties, the values are
the values for the properties.
CmsFile object representing the newly created file.
CmsException - if the wrong properties are given, or if the resourcetype is set to folder.
The CmsException is also thrown, if the filename is not valid or if the user
has not the appropriate rights to create a new file.
protected CmsFolder doCreateFolder(String folder,
String newFolderName)
throws CmsException
folder - the complete path to the folder in which the new folder
will be created.newFolderName - the name of the new folder.
CmsFolder object representing the newly created folder.
CmsException - if the foldername is not valid, or if the user has not the appropriate rights to create
a new folder.
protected CmsFolder doCreateFolder(String newFolderName,
Map properties)
throws CmsException
newFolderName - the name of the new folder.properties - A Hashtable of properties, that should be set for this folder.
The keys for this Hashtable are the names for property-definitions, the values are
the values for the properties.
CmsFolder object representing the newly created folder.
CmsException - if the foldername is not valid, or if the user has not the appropriate rights to create
a new folder.
protected CmsResource doImportResource(String newResourceName,
int resourceType,
Map properties,
int launcherType,
String launcherClassname,
String ownername,
String groupname,
int accessFlags,
long lastmodified,
byte[] filecontent)
throws CmsException
newResourceName - the name of the new resource.resourceType - The resourcetype of the new resourceproperties - A Hashtable of propertyinfos, that should be set for this folder.
The keys for this Hashtable are the names for propertydefinitions, the values are
the values for the propertyinfos.launcherType - The launcher type of the new resourcelauncherClassname - The name of the launcherclass of the new resourceownername - The name of the owner of the new resourcegroupname - The name of the group of the new resourceaccessFlags - The accessFlags of the new resourcefilecontent - The content of the resource if it is of type file
CmsFolder object representing the newly created folder.
CmsException - if the resourcename is not valid, or if the user has not the appropriate rights to create
a new resource.
protected void doWriteResource(String resourcename,
Map properties,
String username,
String groupname,
int accessFlags,
int resourceType,
byte[] filecontent)
throws CmsException
resourcename - The name of the resource to write.properties - The properties of the resource.username - The name of the new owner of the resourcegroupname - The name of the new group of the resourceaccessFlags - The new accessFlags of the resourceresourceType - The new type of the resourcefilecontent - The new filecontent of the resource
CmsException - Throws CmsException if operation was not succesful.
public CmsTask createProject(String projectname,
int projectType,
String roleName,
long timeout,
int priority)
throws CmsException
projectname - the name of the projectprojectType - the type of the Projecttimeout - the time when the Project must finishedpriority - a Priority for the Project
CmsTask object representing the newly created task.
CmsException - if operation was not successful.
public CmsProject createProject(String name,
String description,
String groupname,
String managergroupname)
throws CmsException
name - the name of the project to read.description - the description for the new project.groupname - the name of the group to be set.managergroupname - the name of the managergroup to be set.
CmsException - if operation was not successful.
public CmsProject createProject(String name,
String description,
String groupname,
String managergroupname,
int projecttype)
throws CmsException
name - the name of the project to read.description - the description for the new project.groupname - the name of the group to be set.managergroupname - the name of the managergroup to be set.projecttype - the type of the project (normal or temporary)
CmsException - if operation was not successful.
public CmsProject createTempfileProject()
throws CmsException
CmsException - if operation was not successful.
public CmsPropertydefinition createPropertydefinition(String name,
String resourcetype)
throws CmsException
name - the name of the property-definition to overwrite.resourcetype - the name of the resource-type for the property-definition.
CmsException - if operation was not successful.
public CmsTask createTask(int projectid,
String agentName,
String roleName,
String taskname,
String taskcomment,
int tasktype,
long timeout,
int priority)
throws CmsException
Security: All users can create a new task.
projectid - the Id of the current project task of the user.taskname - a Name of the task.tasktype - the type of the task.taskcomment - a description of the task.timeout - the time when the task must finished.priority - the Id for the priority of the task.
CmsTask object representing the newly created task.
CmsException - Throws CmsException if something goes wrong.
public CmsTask createTask(String agentName,
String roleName,
String taskname,
String taskcomment,
long timeout,
int priority)
throws CmsException
Security: All users can create a new task.
taskname - the name of the task.taskcomment - a description of the task.timeout - the time when the task must finished.priority - the Id for the priority of the task.
CmsTask object representing the newly created task.
CmsException - if operation was not successful.
public void deleteAllProperties(String resourcename)
throws CmsException
resourcename - the name of the resource for which all properties should be deleted.
CmsException - if operation was not successful.
public void deleteFile(String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be deleted, or if the user
has not the appropriate rights to delete the file.
public void deleteFolder(String foldername)
throws CmsException
foldername - the complete path of the folder.
CmsException - if the folder couldn't be deleted, or if the user
has not the rights to delete this folder.
public void deleteEmptyFolder(String foldername)
throws CmsException
foldername - the complete path of the folder.
CmsException - if the folder couldn't be deleted, or if the user
has not the rights to delete this folder.
public void deleteResource(String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be deleted, or if the user
has not the appropriate rights to delete the file.
protected void doDeleteFile(String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be deleted, or if the user
has not the appropriate rights to delete the file.
protected void doDeleteFolder(String foldername)
throws CmsException
foldername - the complete path of the folder.
CmsException - if the folder couldn't be deleted, or if the user
has not the rights to delete this folder.
public void undeleteResource(String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be undeleted, or if the user
has not the appropriate rights to undelete the file.
protected void doUndeleteFile(String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be undeleted, or if the user
has not the appropriate rights to undelete the file.
protected void doUndeleteFolder(String foldername)
throws CmsException
foldername - the complete path of the folder.
CmsException - if the folder couldn't be undeleted, or if the user
has not the rights to undelete this folder.
public void deleteGroup(String delgroup)
throws CmsException
Security: Only the admin user is allowed to delete a group.
delgroup - the name of the group.
CmsException - if operation was not successful.
public void deleteProject(int id)
throws CmsException
id - the id of the project.
CmsException - if operation was not successful.
public void deleteProperty(String resourcename,
String property)
throws CmsException
resourcename - the name of a resource for which the property should be deleted.property - the name of the property.
CmsException - Throws if operation was not successful.
public void deletePropertydefinition(String name,
String resourcetype)
throws CmsException
name - the name of the property-definition to delete.resourcetype - the name of the resource-type for the property-definition.
CmsException - if operation was not successful.
public void deleteUser(int userId)
throws CmsException
Security: Only a admin user is allowed to delete a user.
CmsException - if operation was not successful.
public void deleteUser(String username)
throws CmsException
Security: Only a admin user is allowed to delete a user.
CmsException - if operation was not successful.
public void deleteWebUser(int userId)
throws CmsException
CmsException - if operation was not successful.
public void destroy()
throws CmsException
CmsException - if operation was not successful.
public void endTask(int taskid)
throws CmsException
taskid - the ID of the task to end.
CmsException - if operation was not successful.
public void exportResources(String exportFile,
String[] exportPaths)
throws CmsException
exportFile - the name (absolute Path) of the export resource (zip-file).
CmsException - if operation was not successful.
public void exportResources(String exportFile,
String[] exportPaths,
boolean includeSystem,
boolean excludeUnchanged)
throws CmsException
exportFile - the name (absolute Path) of the export resource (zip-file).includeSystem - indicates if the system resources will be included in the export.excludeUnchanged - true, if unchanged files should be excluded.
CmsException - if operation was not successful.
public void exportResources(String exportFile,
String[] exportPaths,
boolean includeSystem,
boolean excludeUnchanged,
boolean exportUserdata,
long contentAge,
I_CmsReport report)
throws CmsException
exportFile - the name (absolute Path) of the export resource (zip-file).includeSystem - indicates if the system resources will be included in the export.excludeUnchanged - true, if unchanged files should be excluded.report - the cmsReport to handle the log messages.
CmsException - if operation was not successful.
public void exportResources(String exportFile,
String[] exportPaths,
boolean includeSystem,
boolean excludeUnchanged,
boolean exportUserdata)
throws CmsException
exportFile - the name (absolute Path) of the export resource (zip-file).includeSystem - indicates if the system resources will be included in the export.excludeUnchanged - true, if unchanged files should be excluded.
CmsException - if operation was not successful.
public CmsFile exportResource(CmsFile file)
throws CmsException
CmsException
public void exportModuledata(String exportFile,
String[] exportChannels,
String[] exportModules,
I_CmsReport report)
throws CmsException
exportFile - the name (absolute Path) of the export resource (zip)exportChannels - the names (absolute Path) of channels from which should be exportedexportModules - the names of modules from which should be exported
Throws - CmsException if something goes wrong.
CmsException
public void exportStaticResources(Vector startpoints,
Vector projectResources,
Vector allExportedLinks,
CmsPublishedResources changedResources,
I_CmsReport report)
throws CmsException
startpoints - the startpoints for the export.projectResources - allExportedLinks - changedResources - report - the cmsReport to handle the log messages.
CmsException - if operation was not successful.
public void exportStaticResources(Vector linksToExport)
throws CmsException
linksToExport - all links that where exported by the master OpenCms.
CmsException - if operation was not successful.
public CmsObject getCmsObjectForStaticExport(CmsExportRequest dReq,
CmsExportResponse dRes)
throws CmsException
CmsException - if operation was not successful.
public void forwardTask(int taskid,
String newRoleName,
String newUserName)
throws CmsException
taskid - the id of the task which will be forwarded.
CmsException - if operation was not successful.
public Vector getAllAccessibleProjects()
throws CmsException
CmsProject.
CmsException - if operation was not successful.
public Vector getAllManageableProjects()
throws CmsException
CmsProject.
CmsException - if operation was not successful.
public Vector getAllBackupProjects()
throws CmsException
CmsException - Throws CmsException if operation was not succesful.
public Vector getAllExportLinks()
throws CmsException
CmsException - Throws CmsException if operation was not succesful.
public Hashtable getAllResourceTypes()
throws CmsException
CmsException - if operation was not successful.public Hashtable getCacheInfo()
public Vector getChild(String groupname)
throws CmsException
groupname - the name of the group.
CmsException - if operation was not successful.
public Vector getChilds(String groupname)
throws CmsException
groupname - the name of the group.
CmsException - if operation was not successful.public source.org.apache.java.util.Configurations getConfigurations()
public Vector getDirectGroupsOfUser(String username)
throws CmsException
username - the name of the user to get all groups for.
CmsException - if operation was not successful.
public Vector getFilesInFolder(String foldername)
throws CmsException
foldername - the complete path to the folder.
CmsException - if the user has not hte appropriate rigths to access or read the resource.
public Vector getFilesInFolder(String foldername,
boolean includeDeleted)
throws CmsException
foldername - the complete path to the folder.includeDeleted - Include if the folder is marked as deleted
CmsException - if the user has not hte appropriate rigths to access or read the resource.
public Vector getFilesWithProperty(String propertyDefinition,
String propertyValue)
throws CmsException
CmsException - if operation was not successful.public long getFileSystemChanges()
public long getFileSystemFolderChanges()
public Vector getFolderTree()
throws CmsException
CmsException - Throws CmsException if operation was not succesful.
public Vector getGroups()
throws CmsException
CmsException - if operation was not successful
public Vector getGroupsOfUser(String username)
throws CmsException
username - the name of the user to get all groups for.
CmsException - if operation was not succesful.public CmsLauncherManager getLauncherManager()
public CmsElementCache getOnlineElementCache()
public String getLinkSubstitution(String link)
public CmsPageLinks getPageLinks(String page)
throws CmsException
CmsExceptionpublic static CmsStaticExportProperties getStaticExportProperties()
public int getMode()
public void setMode(int mode)
mode - the mode to setpublic Hashtable getVariantDependencies()
public String getReadingpermittedGroup(int projectId,
String resource)
throws CmsException
CmsException
public CmsGroup getParent(String groupname)
throws CmsException
groupname - the name of the group.
CmsException - if operation was not successful.
public I_CmsRegistry getRegistry()
throws CmsException
CmsException - if access is not allowed.public CmsRequestContext getRequestContext()
public Vector getResourcesInFolder(String folder)
throws CmsException
folder - The name of the folder to get the subresources from.
CmsException - Throws CmsException if operation was not succesful.
public Vector getResourcesWithProperty(String propertyDefinition,
String propertyValue,
int resourceType)
throws CmsException
resourceType - The resource type of the resource
CmsException - Throws CmsException if operation was not succesful.
public Vector getResourcesWithProperty(String propertyDefinition)
throws CmsException
CmsException - Throws CmsException if operation was not succesful.
public I_CmsResourceType getResourceType(int resourceType)
throws CmsException
resourceType - the id of the resource to get.
CmsException - if operation was not successful.
public I_CmsResourceType getResourceType(String resourceType)
throws CmsException
resourceType - the name of the resource to get.
CmsException - if operation was not successful.
public Vector getSubFolders(String foldername)
throws CmsException
foldername - the complete path to the folder.
CmsException - if the user has not the rights to access or read the resource.
public Vector getSubFolders(String foldername,
boolean includeDeleted)
throws CmsException
foldername - the complete path to the folder.includeDeleted - Include if the folder is marked as deleted
CmsException - if the user has not the rights to access or read the resource.
public String getTaskPar(int taskid,
String parname)
throws CmsException
taskid - the id of the task.parname - the name of the parameter.
CmsException - if operation was not successful.
public int getTaskType(String taskname)
throws CmsException
taskname - the name of the task.
CmsException - if operation was not successful.
public Vector getUsers()
throws CmsException
CmsException - if operation was not successful.
public Vector getUsers(int type)
throws CmsException
type - the type of the users.
CmsException - if operation was not successful.
public Vector getUsers(int type,
String namefilter)
throws CmsException
type - the type of the users.
CmsException - if operation was not successful.
public Vector getUsersOfGroup(String groupname)
throws CmsException
groupname - the name of the group to get all users for.
CmsException - if operation was not successful.
public Vector getUsersByLastname(String Lastname,
int UserType,
int UserStatus,
int wasLoggedIn,
int nMax)
throws CmsException
Lastname - the start of the users lastnameUserType - webuser or systemuserUserStatus - enabled, disabledwasLoggedIn - was the user ever locked in?nMax - max number of results
CmsException - if operation was not successful.
public void importFolder(String importFile,
String importPath)
throws CmsException
importFile - the name (absolute Path) of the import resource (zipfile or folder).importPath - the name (absolute Path) of the folder in which should be imported.
CmsException - if operation was not successful.
public CmsResource importResource(String source,
String destination,
String type,
String user,
String group,
String access,
long lastmodified,
Map properties,
String launcherStartClass,
byte[] content,
String importPath)
throws CmsException
source - the name of the import resource (zipfile or folder).destination - the name (absolute Path) of the folder in which should be imported.type - the type of the resourceuser - the owner of the resourcegroup - the group of the resourceaccess - the access flags of the resourceproperties - the properties of the resourcelauncherStartClass - the name of launcher start classcontent - the content of the resourceimportPath - the name of the import path
CmsException - if operation was not successful.
public void importResources(String importFile,
String importPath)
throws CmsException
importFile - the name (absolute Path) of the import resource (zipfile or folder).importPath - the name (absolute Path) of folder in which should be imported.
CmsException - if operation was not successful.
public void importResources(String importFile,
String importPath,
I_CmsReport report)
throws CmsException
importFile - the name (absolute Path) of the import resource (zipfile or folder).importPath - the name (absolute Path) of folder in which should be imported.report - A report object to provide the loggin messages.
CmsException - if operation was not successful.
public void init(I_CmsResourceBroker broker)
throws CmsException
broker - the resourcebroker to access the database.
CmsException - if operation was not successful.
public void init(I_CmsResourceBroker broker,
I_CmsRequest req,
I_CmsResponse resp,
String user,
String currentGroup,
int currentProjectId,
boolean streaming,
CmsElementCache elementCache,
CmsCoreSession sessionStorage,
CmsResourceTranslator directoryTranslator,
CmsResourceTranslator fileTranslator)
throws CmsException
broker - the resourcebroker to access the database.req - the CmsRequest.resp - the CmsResponse.user - the current user for this request.currentGroup - the current group for this request.currentProjectId - the current projectId for this request.streaming - true if streaming should be enabled while creating the request context, false otherwise.elementCache - Starting point for the element cache or null if the element cache should be disabled.directoryTranslator - Translator for directories (file with full path)fileTranslator - Translator for new file names (without path)
CmsException - if operation was not successful.
public boolean isAdmin()
throws CmsException
true, if the users current group is the admin-group; false otherwise.
CmsException - if operation was not successful.
public boolean isManagerOfProject()
throws CmsException
true, if the users current group is the admin-group; false otherwise.
CmsException - if operation was not successful.
public CmsUser lockedBy(CmsResource resource)
throws CmsException
resource - the resource to check.
CmsException - if operation was not successful.
public CmsUser lockedBy(String resource)
throws CmsException
resource - The complete path to the resource.
CmsException - if operation was not successful.
public void lockResource(String resource)
throws CmsException
resource - The complete path to the resource to lock.
CmsException - if the user has not the rights to lock this resource.
It will also be thrown, if there is an existing lock.
public void lockResource(String resource,
boolean force)
throws CmsException
resource - the complete path to the resource to lock.force - if force is true, a existing locking will be overwritten.
CmsException - if the user has not the rights to lock this resource.
It will also be thrown, if there is a existing lock and force was set to false.
protected void doLockResource(String resource,
boolean force)
throws CmsException
resource - the complete path to the resource to lock.force - if force is true, a existing locking will be overwritten.
CmsException - if the user has not the rights to lock this resource.
It will also be thrown, if there is a existing lock and force was set to false.
public String loginUser(String username,
String password)
throws CmsException
username - the name of the user.password - the password of the user.
CmsException - if operation was not successful
public String loginWebUser(String username,
String password)
throws CmsException
username - the name of the user.password - the password of the user.
CmsException - if operation was not successful
public void moveFile(String source,
String destination)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfile.
CmsException - if the user has not the rights to move this resource,
or if the file couldn't be moved.
public void moveResource(String source,
String destination)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfile.
CmsException - if the user has not the rights to move this resource,
or if the file couldn't be moved.
protected void doMoveFile(String source,
String destination)
throws CmsException
source - the complete path of the sourcefile.destination - the complete path of the destinationfile.
CmsException - if the user has not the rights to move this resource,
or if the file couldn't be moved.
public CmsProject onlineProject()
throws CmsException
This is the default project. All anonymous (or guest) user will see the resources of this project.
CmsException - if operation was not successful.
public void publishProject(int id)
throws CmsException
id - the id of the project to be published.
CmsException - if operation was not successful.
public void publishProject(int id,
I_CmsReport report)
throws CmsException
id - the id of the project to be published.report - A report object to provide the loggin messages.
CmsException - if operation was not successful.
public void publishResource(String resourcename)
throws CmsException
CmsException - if operation was not successful.
public int publishResource(String resourcename,
boolean justPrepare)
throws CmsException
CmsException - if operation was not successful.
public int publishResource(String resourcename,
boolean justPrepare,
I_CmsReport report)
throws CmsException
CmsException
public CmsUser readAgent(CmsTask task)
throws CmsException
task - the task to read the agent from.
CmsException - if operation was not successful.
public Vector readAllFileHeaders(String filename)
throws CmsException
filename - the name of the file to be read.
CmsException - if operation was not successful.
public Vector readAllFileHeadersForHist(String filename)
throws CmsException
filename - the name of the file to be read.
CmsException - if operation was not successful.
public Vector readAllProjectResources(int projectId)
throws CmsException
CmsException - Throws CmsException if operation was not succesful
public Vector readAllPropertydefinitions(int resourceType)
throws CmsException
CmsException - if operation was not successful.
public Vector readAllPropertydefinitions(String resourcetype)
throws CmsException
resourcetype - the name of the resource type to read the
property-definitions for.
CmsException - if operation was not successful.
public void deleteLinkEntrys(int pageId)
throws CmsException
pageId - The resourceId (offline) of the page whose links should be deleted
CmsException
public void createLinkEntrys(int pageId,
Vector linkTargets)
throws CmsException
pageId - The resourceId (offline) of the page whose liks should be traced.
CmsException
public Vector readLinkEntrys(int pageId)
throws CmsException
pageId - The resourceId (offline) of the page whose liks should be read.
CmsException
public void deleteOnlineLinkEntrys(int pageId)
throws CmsException
pageId - The resourceId (online) of the page whose links should be deleted
CmsException
public void createOnlineLinkEntrys(int pageId,
Vector linkTarget)
throws CmsException
pageId - The resourceId (online) of the page whose liks should be traced.linkTarget - A vector of strings (the linkdestinations).
CmsException
public Vector readOnlineLinkEntrys(int pageId)
throws CmsException
pageId - The resourceId (online) of the page whose liks should be read.
CmsException
public Vector getOnlineBrokenLinks()
throws CmsException
CmsException
public void getBrokenLinks(int projectId,
I_CmsReport report,
Vector changed,
Vector deleted,
Vector newRes)
throws CmsException
projectId - report - A cmsReport object for logging while the method is still running.changed - A vecor (of CmsResources) with the changed resources in the project.deleted - A vecor (of CmsResources) with the deleted resources in the project.newRes - A vecor (of CmsResources) with the new resources in the project.
CmsException
public void updateOnlineProjectLinks(Vector deleted,
Vector changed,
Vector newRes,
int pageType)
throws CmsException
CmsException
public String readExportPath()
throws CmsException
CmsException - if operation was not successful.
public CmsExportLink readExportLink(String request)
throws CmsException
request - the reourcename with the url parameter.
CmsException - if the user has not the rights to read this resource,
or if it couldn't be read.
public CmsExportLink readExportLinkHeader(String request)
throws CmsException
request - the reourcename with the url parameter.
CmsException - if the user has not the rights to read this resource,
or if it couldn't be read.
public void writeExportLink(CmsExportLink link)
throws CmsException
link - the cmsexportlink object to write.
CmsException - if something goes wrong.
public void deleteExportLink(String link)
throws CmsException
link - the name of the link
CmsException
public void deleteExportLink(CmsExportLink link)
throws CmsException
link - the cmsExportLink object to delete.
CmsException
public Vector getDependingExportLinks(Vector res)
throws CmsException
CmsException
public void writeExportLinkProcessedState(CmsExportLink link)
throws CmsException
link - the cmsexportlink.
CmsException - if something goes wrong.
public CmsFile readFile(String filename)
throws CmsException
filename - the complete path to the file.
CmsException - if the user has not the rights to read this resource,
or if the file couldn't be read.
public CmsFile readFile(String filename,
boolean includeDeleted)
throws CmsException
filename - the complete path to the file.includeDeleted - If true the deleted file will be returned.
CmsException - if the user has not the rights to read this resource,
or if the file couldn't be read.
public CmsFile readFile(String folder,
String filename)
throws CmsException
folder - the complete path to the folder from which the file will be read.filename - the name of the file to be read.
CmsException - , if the user has not the rights
to read this resource, or if the file couldn't be read.
public Hashtable readFileExtensions()
throws CmsException
CmsException - if operation was not successful.
public CmsResource readFileHeader(String filename)
throws CmsException
filename - the complete path of the file to be read.
CmsException - , if the user has not the rights
to read the file headers, or if the file headers couldn't be read.
public CmsResource readFileHeader(String filename,
boolean includeDeleted)
throws CmsException
filename - the complete path of the file to be readincludeDeleted - if true, deleted files (in offline projects) will
also be read
CmsException - if the user has not the rights
to read the file headers, or if the file headers couldn't be read
public CmsResource readFileHeader(String filename,
int projectId)
throws CmsException
filename - the complete path of the file to be read.projectId - the id of the project where the resource should belong to
CmsException - , if the user has not the rights
to read the file headers, or if the file headers couldn't be read.
public CmsResource readFileHeader(String folder,
String filename)
throws CmsException
folder - the complete path to the folder from which the file will be read.filename - the name of the file to be read.
CmsException - if the user has not the rights
to read the file header, or if the file header couldn't be read.
public CmsResource readFileHeaderForHist(String filename,
int versionId)
throws CmsException
filename - the complete path of the file to be read.versionId - the version id of the resource
CmsException - , if the user has not the rights
to read the file headers, or if the file headers couldn't be read.
public CmsBackupResource readFileForHist(String filename,
int versionId)
throws CmsException
filename - the complete path of the file to be read.versionId - the version id of the resource
CmsException - , if the user has not the rights
to read the file, or if the file couldn't be read.
public Vector readFileHeaders(int projectId)
throws CmsException
projectId - the id of the project to read the file headers for.
CmsException - if the user has not the rights
to read the file headers, or if the file headers couldn't be read.
public CmsFolder readFolder(String folderName,
boolean includeDeleted)
throws CmsException
folderName - the complete path to the folder to be readincludeDeleted - Include the folder if it is marked as deleted
CmsException - If the user does not have the permissions
to read this folder, or if the folder couldn't be read
public CmsFolder readFolder(String folderName)
throws CmsException
CmsException - if the user does not have the permissions
to read this folder, or if the folder couldn't be read
public CmsFolder readFolder(int folderid,
boolean includeDeleted)
throws CmsException
folderid - the id of the folder to be readincludeDeleted - Include the folder if it is marked as deleted
CmsException - if the user does not have the permissions
to read this folder, or if the folder couldn't be read
public Vector readGivenTasks(int projectId,
String ownerName,
int taskType,
String orderBy,
String sort)
throws CmsException
projectId - the id of the project in which the tasks are defined.orderBy - specifies how to order the tasks.
CmsException - if operation was not successful.
public CmsGroup readGroup(CmsProject project)
throws CmsException
CmsException - if operation was not successful.
public CmsGroup readGroup(CmsResource resource)
throws CmsException
CmsException - if operation was not successful.
public CmsGroup readGroup(CmsTask task)
throws CmsException
task - the task to read the role from.
CmsException - if operation was not successful.
public CmsGroup readGroup(String groupname)
throws CmsException
groupname - the name of the group to be returned.
CmsException - if operation was not successful.
public CmsGroup readGroup(int groupid)
throws CmsException
groupid - the id of the group to be returned.
CmsException - if operation was not successful.
public CmsGroup readManagerGroup(CmsProject project)
throws CmsException
CmsException - if operation was not successful.
public Hashtable readMimeTypes()
throws CmsException
CmsException - if operation was not successful.
public CmsUser readOriginalAgent(CmsTask task)
throws CmsException
task - the task to read the original agent from.
CmsException - if operation was not successful.
public CmsUser readOwner(CmsProject project)
throws CmsException
CmsException - if operation was not successful.
public CmsUser readOwner(CmsResource resource)
throws CmsException
CmsException - if operation was not successful.
public CmsUser readOwner(CmsTask task)
throws CmsException
CmsException - if operation was not successful.
public CmsUser readOwner(CmsTaskLog log)
throws CmsException
CmsException - if operation was not successful.
public CmsProject readProject(int id)
throws CmsException
CmsException - if operation was not successful.
public CmsProject readProject(CmsResource res)
throws CmsException
CmsException - if operation was not successful.
public CmsProject readProject(CmsTask task)
throws CmsException
CmsException - if operation was not successful.
public Vector readProjectView(int projectId,
String filter)
throws CmsException
projectId - the id of the project to read the file headers for.filter - The filter for the resources (all, new, changed, deleted, locked)
CmsException
public CmsBackupProject readBackupProject(int versionId)
throws CmsException
CmsException - if operation was not successful.
public Vector readProjectLogs(int projectId)
throws CmsException
projectId - the id of the project for which the tasklog will be read.
CmsException - if operation was not successful.
public String readProperty(String resource,
String property)
throws CmsException
resource - the resource to look up the property forproperty - the name of the property to look up
null if nothing was found
CmsException - in case there where problems reading the property
public String readProperty(String resource,
String property,
boolean search)
throws CmsException
resource - the resource to look up the property forproperty - the name of the property to look upsearch - if true, the property will be looked up on all parent folders
if it is not attached to the the resource, if false not (ie. normal
property lookup)
null if nothing was found
CmsException - in case there where problems reading the property
public String readProperty(String resource,
String property,
boolean search,
String propertyDefault)
throws CmsException
true).
resource - the resource to look up the property forproperty - the name of the property to look upsearch - if true, the property will be looked up on all parent folders
if it is not attached to the the resource, if false not (ie. normal
property lookup)propertyDefault - a default value that will be returned if
the property was not found on the selected resource
propertyDefault parameter is returned
CmsException - in case there where problems reading the property
public Map readProperties(String resource)
throws CmsException
resource - the resource to look up the property for
CmsException - in case there where problems reading the properties
public Map readProperties(String resource,
boolean search)
throws CmsException
resource - the resource to look up the property forsearch - if true, the properties will also be looked up on all parent folders
and the results will be merged, if false not (ie. normal property lookup)
CmsException - in case there where problems reading the properties
public Hashtable readAllProperties(String resource)
throws CmsException
CmsException - if operation was not succesful
public CmsPropertydefinition readPropertydefinition(String name,
String resourcetype)
throws CmsException
name - the name of the property-definition to read.resourcetype - the name of the resource type for the property-definition.
CmsException - if operation was not successful.
public CmsTask readTask(int id)
throws CmsException
id - the id of the task to be read.
CmsException - if operation was not successful.
public Vector readTaskLogs(int taskid)
throws CmsException
taskid - the task for which the tasklog will be read.
CmsException - if operation was not successful.
public Vector readTasksForProject(int projectId,
int tasktype,
String orderBy,
String sort)
throws CmsException
projectId - the id of the project in which the tasks are defined. Can be null to select all tasks.tasktype - the type of task you want to read: C_TASKS_ALL, C_TASKS_OPEN, C_TASKS_DONE, C_TASKS_NEWorderBy - specifies how to order the tasks.sort - sort order: C_SORT_ASC, C_SORT_DESC, or null.
CmsException - if operation was not successful.
public Vector readTasksForRole(int projectId,
String roleName,
int tasktype,
String orderBy,
String sort)
throws CmsException
projectId - the id of the Project in which the tasks are defined.tasktype - the type of task you want to read: C_TASKS_ALL, C_TASKS_OPEN, C_TASKS_DONE, C_TASKS_NEW.orderBy - specifies how to order the tasks.sort - sort order C_SORT_ASC, C_SORT_DESC, or null
CmsException - if operation was not successful.
public Vector readTasksForUser(int projectId,
String userName,
int tasktype,
String orderBy,
String sort)
throws CmsException
projectId - the id of the Project in which the tasks are defined.tasktype - the type of task you want to read: C_TASKS_ALL, C_TASKS_OPEN, C_TASKS_DONE, C_TASKS_NEW.orderBy - specifies how to order the tasks.sort - sort order C_SORT_ASC, C_SORT_DESC, or null
CmsException - if operation was not successful.
public CmsUser readUser(int id)
throws CmsException
id - the id of the user to be returned.
CmsException - if operation was not successful
public CmsUser readUser(String username)
throws CmsException
username - the name of the user to be returned.
CmsException - if operation was not successful
public CmsUser readUser(String username,
int type)
throws CmsException
username - the name of the user to be returned.type - the type of the user.
CmsException - if operation was not successful
public CmsUser readUser(String username,
String password)
throws CmsException
username - the name of the user to be returned.password - the password of the user to be returned.
CmsException - if operation was not successful
public CmsUser readWebUser(String username)
throws CmsException
username - The username of the user that is to be read.
CmsException - Throws CmsException if operation was not succesful
public CmsUser readWebUser(String username,
String password)
throws CmsException
username - The username of the user that is to be read.password - The password of the user that is to be read.
CmsException - Throws CmsException if operation was not succesful
public void reaktivateTask(int taskId)
throws CmsException
CmsException - if operation was not successful.
public void recoverPassword(String username,
String recoveryPassword,
String newPassword)
throws CmsException
username - the name of the user.recoveryPassword - the recovery password.newPassword - the new password.
CmsException - if operation was not successfull.
public void removeUserFromGroup(String username,
String groupname)
throws CmsException
Security: Only the admin user is allowed to remove a user from a group.
username - the name of the user that is to be removed from the group.groupname - the name of the group.
CmsException - if operation was not successful.
public void renameFile(String oldname,
String newname)
throws CmsException
oldname - the complete path to the file which will be renamed.newname - the new name of the file.
CmsException - if the user has not the rights
to rename the file, or if the file couldn't be renamed.
public void renameResource(String oldname,
String newname)
throws CmsException
oldname - the complete path to the file which will be renamed.newname - the new name of the file.
CmsException - if the user has not the rights
to rename the file, or if the file couldn't be renamed.
protected void doRenameFile(String oldname,
String newname)
throws CmsException
oldname - the complete path to the file which will be renamed.newname - the new name of the file.
CmsException - if the user has not the rights
to rename the file, or if the file couldn't be renamed.
public void restoreResource(int versionId,
String filename)
throws CmsException
versionId - The version id of the resourcefilename - The name of the file to restore
CmsException - Throws CmsException if operation was not succesful.
protected void doRestoreResource(int versionId,
String filename)
throws CmsException
versionId - The version id of the resourcefilename - The name of the file to restore
CmsException - Throws CmsException if operation was not succesful.
public CmsFolder rootFolder()
throws CmsException
CmsException - if operation was not successful.public void setLauncherManager(CmsLauncherManager newM_launcherManager)
newM_launcherManager - com.opencms.launcher.CmsLauncherManager
public void setName(int taskId,
String name)
throws CmsException
name - the new name of the task.
CmsException - if operationwas not successful.
public void setParentGroup(String groupName,
String parentGroupName)
throws CmsException
groupName - the name of the group that should be written to the Cms.parentGroupName - the name of the parentGroup to set, or null if the parent
group should be deleted.
CmsException - if operation was not successfull.
public void setPassword(String username,
String newPassword)
throws CmsException
username - the name of the user.newPassword - the new password.
CmsException - if operation was not successful.
public void setPassword(String username,
String oldPassword,
String newPassword)
throws CmsException
username - the name of the user.oldPassword - the old password.newPassword - the new password.
CmsException - if operation was not successful.
public void setPriority(int taskId,
int priority)
throws CmsException
priority - the new priority value.
CmsException - if operation was not successful.
public void setRecoveryPassword(String username,
String oldPassword,
String newPassword)
throws CmsException
username - the name of the user.newPassword - the new recovery password.
CmsException - if operation was not successful.
public void setTaskPar(int taskid,
String parname,
String parvalue)
throws CmsException
taskid - the Id of the task.parname - the ame of the parameter.parvalue - the value of the parameter.
CmsException - if operation was not successful.
public void setTimeout(int taskId,
long timeout)
throws CmsException
timeout - the new timeout value.
CmsException - if operation was not successful.
public void syncFolder(String resourceName)
throws CmsException
CmsException - if operation was not successful.
public void unlockProject(int id)
throws CmsException
id - the id of the project to be unlocked.
CmsException - if operation was not successful.
public void unlockResource(String resource)
throws CmsException
resource - the complete path to the resource to be unlocked.
CmsException - if the user has not the rights
to unlock this resource.
public void undoChanges(String filename)
throws CmsException
filename - the complete path of the file.
CmsException - if the file couldn't be deleted, or if the user
has not the appropriate rights to write the file.
protected void doUndoChanges(String resource)
throws CmsException
resource - the complete path to the resource to be unlocked.
CmsException - if the user has not the rights
to write this resource.
protected void doUnlockResource(String resource)
throws CmsException
resource - the complete path to the resource to be unlocked.
CmsException - if the user has not the rights
to unlock this resource.
public boolean userInGroup(String username,
String groupname)
throws CmsException
username - the name of the user to test.groupname - the name of the group to test.
true, if the user is in the group; else false otherwise.
CmsException - if operation was not successful.
public void writeExportPath(String path)
throws CmsException
CmsException - if operation ws not successful.
public void writeFile(CmsFile file)
throws CmsException
file - the file to write.
CmsException - if resourcetype is set to folder. The CmsException will also be thrown,
if the user has not the rights write the file.
public void writeFileExtensions(Hashtable extensions)
throws CmsException
Security: Only the admin user is allowed to write file extensions.
extensions - holds extensions as keys and resourcetypes (Strings) as values.
CmsException
public void writeFileHeader(CmsFile file)
throws CmsException
file - the file to write.
CmsException - if resourcetype is set to folder. The CmsException will also be thrown,
if the user has not the rights to write the file header..
public void writeGroup(CmsGroup group)
throws CmsException
group - the group that should be written to the Cms.
CmsException - if operation was not successful.
public void writeProperties(String name,
Map properties)
throws CmsException
name - the resource-name of which the Property has to be set.properties - a Hashtable with property-definitions and property values as Strings.
CmsException - if operation was not successful.
public void writeProperty(String name,
String property,
String value)
throws CmsException
name - the resource-name for which the property will be set.property - the property-definition name.value - the value for the property to be set.
CmsException - if operation was not successful.
public CmsPropertydefinition writePropertydefinition(CmsPropertydefinition definition)
throws CmsException
CmsException - if operation was not successful.
public void writeTaskLog(int taskid,
String comment)
throws CmsException
taskid - the Id of the task.comment - the description for the log.
CmsException - if operation was not successful.
public void writeTaskLog(int taskid,
String comment,
int taskType)
throws CmsException
taskid - the Id of the task .comment - the description for the log
CmsException - if operation was not successful.
public void writeUser(CmsUser user)
throws CmsException
Security: Only the admin user is allowed to update the user information.
user - the user to be written.
CmsException - if operation was not successful.
public void writeWebUser(CmsUser user)
throws CmsException
user - the user to be written.
CmsException - if operation was not successful.
public void sendBroadcastMessage(String message)
throws CmsException
CmsException
public Vector getLoggedInUsers()
throws CmsException
CmsException
public void changeLockedInProject(int projectId,
String resourcename)
throws CmsException
resourcename - The name of the resource to change
CmsException
protected void doChangeLockedInProject(int projectId,
String resourcename)
throws CmsException
resourcename - The name of the resource to change
CmsExceptionpublic String getSiteRoot(String resourcename)
resourcename - The name of the resource
public String getSiteName()
public void setContextToVfs()
public void setContextToCos()
public void setContextTo(String name)
name - The name of the contextpublic boolean isHistoryEnabled()
public int getBackupVersionId()
public void backupProject(int projectId,
int versionId,
long publishDate)
throws CmsException
versionId - The version of the backuppublishDate - The date of publishing
CmsException - Throws CmsException if operation was not succesful.
public String readCronTable()
throws CmsException
CmsException
public void writeCronTable(String crontable)
throws CmsException
CmsExceptionpublic String digest(String value)
value - The value to encrypt.
public int getLimitedWorkplacePort()
public void changeUserType(int userId,
int userType)
throws CmsException
userId - The id of the user to changeuserType - The new type of the user
CmsException
public void changeUserType(String username,
int userType)
throws CmsException
username - The name of the user to changeuserType - The new type of the user
CmsException
public Vector readResourcesLikeName(String resourcename)
throws CmsException
resourcename - A part of resourcename
CmsException - Throws CmsException if operation was not succesful.
public Vector readFilesByType(int projectId,
int resourcetype)
throws CmsException
projectId - A project id for reading online or offline resourcesresourcetype - The type of the files.
CmsException - Throws CmsException if operation was not succesful
public void writeLinkCheckTable(Hashtable linkchecktable)
throws CmsException
linkchecktable - The hashtable that contains the links that were not reachable
CmsException
public Hashtable readLinkCheckTable()
throws CmsException
CmsException
public int deleteBackups(int weeks)
throws CmsException
weeks - The number of weeks: the max age of the remaining versions
CmsException
public boolean accessReadVisible(CmsResource resource)
throws CmsException
resource - The resource to check.
CmsException
public Vector getVisibleResourcesWithProperty(String propertyDefinition,
String propertyValue,
int resourceType)
throws CmsException
resourceType - The resource type of the resource
CmsException - Throws CmsException if operation was not succesful.
public void touch(String resourceName,
long timestamp,
boolean touchRecursive)
throws CmsException
resourceName - the name of the resource to changetimestamp - timestamp the new timestamp of the changed resource
CmsException
protected void doTouch(String resourceName,
long timestamp)
throws CmsException
resourceName - the name of the resource to changetimestamp - timestamp the new timestamp of the changed resource
CmsException
public ArrayList joinLinksToTargets()
throws CmsException
CmsExceptionCmsResourceBroker.joinLinksToTargets(com.opencms.file.CmsObject, com.opencms.file.CmsUser, com.opencms.file.CmsProject, com.opencms.report.I_CmsReport)
public ArrayList joinLinksToTargets(CmsProject theProject)
throws CmsException
theProject - the CmsProject for which the links should be joined with their targets
CmsExceptionCmsResourceBroker.joinLinksToTargets(com.opencms.file.CmsObject, com.opencms.file.CmsUser, com.opencms.file.CmsProject, com.opencms.report.I_CmsReport)
public ArrayList joinLinksToTargets(I_CmsReport theReport)
throws CmsException
theReport - the report to print the output
CmsExceptionCmsResourceBroker.joinLinksToTargets(com.opencms.file.CmsObject, com.opencms.file.CmsUser, com.opencms.file.CmsProject, com.opencms.report.I_CmsReport)
public ArrayList joinLinksToTargets(CmsProject theProject,
I_CmsReport theReport)
throws CmsException
theProject - the CmsProject for which the links should be joined with their targetstheReport - the report to print the output
CmsExceptionCmsResourceBroker.joinLinksToTargets(com.opencms.file.CmsObject, com.opencms.file.CmsUser, com.opencms.file.CmsProject, com.opencms.report.I_CmsReport)
public ArrayList joinLinksToTargets(CmsUser theUser,
CmsProject theProject,
I_CmsReport theReport)
throws CmsException
theUser - the current usertheProject - the CmsProject for which the links should be joined with their targetstheReport - the report to print the output
CmsExceptionCmsResourceBroker.joinLinksToTargets(com.opencms.file.CmsObject, com.opencms.file.CmsUser, com.opencms.file.CmsProject, com.opencms.report.I_CmsReport)
public ArrayList fetchVfsLinksForResource(String theResourceName)
throws CmsException
theResourceName - the name of the resource for which all VFS links are fetched
CmsException
public int doDecrementLinkCountForResource(String theResourceName)
throws CmsException
theResourceName - the name of the resource for which the link count is decremented
CmsException
public int doIncrementLinkCountForResource(String theResourceName)
throws CmsException
theResourceName - the name of the resource for which the link count is incremented
CmsException
public void linkResourceToTarget(String theLinkResourceName,
String theTargetResourceName)
throws CmsException
theLinkResourceName - the resource name of the VFS linktheTargetResourceName - the name of the link's target resource
CmsException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||