|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.file.genericSql.CmsResourceBroker
This is THE resource broker. It merges all resource broker into one public class. The interface is local to package. All methods get additional parameters (callingUser and currentproject) to check the security- police.
| Field Summary | |
protected static String |
C_CACHE_ALL_PROPERTIES
|
protected static String |
C_CACHE_NULL_PROPERTY_VALUE
|
protected Map |
m_accessCache
|
protected int |
m_cachelimit
|
protected source.org.apache.java.util.Configurations |
m_configuration
The configuration of the property-file. |
protected CmsDbAccess |
m_dbAccess
The access-module. |
protected long |
m_fileSystemChanges
Constant to count the file-system changes. |
protected long |
m_fileSystemFolderChanges
Constant to count the file-system changes if Folders are involved. |
protected Map |
m_groupCache
|
protected int |
m_limitedWorkplacePort
The portnumber the workplace access is limited to. |
protected CmsProject |
m_onlineProjectCache
|
protected Map |
m_projectCache
|
protected Map |
m_propertyCache
|
protected Map |
m_propertyDefCache
|
protected Map |
m_propertyDefVectorCache
|
protected String |
m_refresh
|
protected I_CmsRegistry |
m_registry
The Registry |
protected Map |
m_resourceCache
|
protected Map |
m_resourceListCache
|
protected Hashtable |
m_resourceTypes
Hashtable with resource-types. |
protected Map |
m_userCache
|
protected Map |
m_userGroupsCache
|
| Constructor Summary | |
CmsResourceBroker()
|
|
| Method Summary | |
void |
acceptTask(CmsUser currentUser,
CmsProject currentProject,
int taskId)
Accept a task from the Cms. |
boolean |
accessCreate(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Checks, if the user may create this resource. |
boolean |
accessCreate(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
Checks, if the user may create this resource. |
protected boolean |
accessGroup(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource,
int flags)
Checks, if the group may access this resource. |
boolean |
accessLock(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Checks, if the user may lock this resource. |
boolean |
accessLock(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
Checks, if the user may lock this resource. |
protected boolean |
accessOther(CmsResource resource,
int flags)
Checks, if others may access this resource. |
protected boolean |
accessOwner(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource,
int flags)
Checks, if the owner may access this resource. |
boolean |
accessProject(CmsUser currentUser,
CmsProject currentProject,
int projectId)
Tests if the user can access the project. |
boolean |
accessRead(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Checks if the user may read this resource. |
boolean |
accessRead(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
Checks if the user may read this resource. |
boolean |
accessReadVisible(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Checks, if the user may read this resource and if it is visible to him. |
boolean |
accessUnlock(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Checks, if the user may unlock this resource. |
boolean |
accessWrite(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Checks, if the user may write this resource. |
boolean |
accessWrite(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
Checks, if the user may write this resource. |
boolean |
accessWriteUnlocked(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Checks, if the user may write the unlocked resource. |
void |
addFileExtension(CmsUser currentUser,
CmsProject currentProject,
String extension,
String resTypeName)
adds a file extension to the list of known file extensions Security: Users, which are in the group "administrators" are granted. |
CmsGroup |
addGroup(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
int flags,
String parent)
Add a new group to the Cms. |
CmsUser |
addImportUser(CmsUser currentUser,
CmsProject currentProject,
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. |
CmsUser |
addUser(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
Adds a user to the Cms. |
void |
addUserToGroup(CmsUser currentUser,
CmsProject currentProject,
String username,
String groupname)
Adds a user to a group. |
CmsUser |
addWebUser(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
Adds a web user to the Cms. |
CmsUser |
addWebUser(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String name,
String password,
String group,
String additionalGroup,
String description,
Hashtable additionalInfos,
int flags)
Adds a web user to the Cms. |
CmsUser |
anonymousUser(CmsUser currentUser,
CmsProject currentProject)
Returns the anonymous user object. |
void |
backupProject(int projectId,
int versionId,
long publishDate,
CmsUser currentUser)
Creates a backup of the published project |
void |
changeLockedInProject(int projectId,
String resourcename,
CmsUser currentUser)
Changes the project-id of a resource to the new project for publishing the resource directly |
void |
changeUserType(CmsUser currentUser,
CmsProject currentProject,
CmsUser user,
int userType)
Changes the user type of the user Only the administrator can change the type |
void |
changeUserType(CmsUser currentUser,
CmsProject currentProject,
int userId,
int userType)
Changes the user type of the user Only the administrator can change the type |
void |
changeUserType(CmsUser currentUser,
CmsProject currentProject,
String username,
int userType)
Changes the user type of the user Only the administrator can change the type |
void |
chgrp(CmsUser currentUser,
CmsProject currentProject,
String filename,
String newGroup)
Changes the group for this resource Only the group of a resource in an offline project can be changed. |
void |
chmod(CmsUser currentUser,
CmsProject currentProject,
String filename,
int flags)
Changes the flags for this resource. |
void |
chown(CmsUser currentUser,
CmsProject currentProject,
String filename,
String newOwner)
Changes the owner for this resource. |
void |
chstate(CmsUser currentUser,
CmsProject currentProject,
String filename,
int state)
Changes the state for this resource The user may change this, if he is admin of the resource. |
void |
chtype(CmsUser currentUser,
CmsProject currentProject,
String filename,
String newType)
Changes the resourcetype for this resource Only the resourcetype of a resource in an offline project can be changed. |
void |
clearcache()
Clears all internal DB-Caches. |
protected void |
clearResourceCache()
Clears all the depending caches when a resource was changed |
protected void |
clearResourceCache(String resourcename,
CmsProject currentProject,
CmsUser currentUser)
Clears all the depending caches when a resource was changed |
protected void |
clearUserCache(CmsUser user)
Clears the user cache for the given user |
void |
copyFile(CmsUser currentUser,
CmsProject currentProject,
String source,
String destination)
Copies a file in the Cms. |
void |
copyFolder(CmsUser currentUser,
CmsProject currentProject,
String source,
String destination)
Copies a folder in the Cms. |
void |
copyResourceToProject(CmsUser currentUser,
CmsProject currentProject,
String resource)
Copies a resource from the online project to a new, specified project. |
int |
countLockedResources(CmsUser currentUser,
CmsProject currentProject,
int id)
Counts the locked resources in this project. |
CmsDbAccess |
createDbAccess(source.org.apache.java.util.Configurations configurations)
return the correct DbAccess class. |
CmsProject |
createDirectPublishProject(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
String groupname,
String managergroupname,
int projecttype)
Creates a project for the direct publish. |
CmsFile |
createFile(CmsUser currentUser,
CmsGroup currentGroup,
CmsProject currentProject,
String newFileName,
byte[] contents,
String type,
Map propertyinfos)
Creates a new file with the given content and resourcetype. |
CmsFolder |
createFolder(CmsUser currentUser,
CmsGroup currentGroup,
CmsProject currentProject,
String newFolderName,
Map propertyinfos)
Creates a new folder. |
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. |
CmsProject |
createProject(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
String groupname,
String managergroupname)
Creates a project. |
CmsProject |
createProject(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
String groupname,
String managergroupname,
int projecttype)
Creates a project. |
CmsTask |
createProject(CmsUser currentUser,
String projectName,
int projectType,
String roleName,
long timeout,
int priority)
Creates a new project for task handling. |
CmsPropertydefinition |
createPropertydefinition(CmsUser currentUser,
CmsProject currentProject,
String name,
String resourcetype)
Creates the propertydefinition for the resource type. |
CmsTask |
createTask(CmsUser currentUser,
CmsProject currentProject,
String agentName,
String roleName,
String taskname,
String taskcomment,
long timeout,
int priority)
Creates a new task. |
CmsTask |
createTask(CmsUser currentUser,
int projectid,
String agentName,
String roleName,
String taskName,
String taskComment,
int taskType,
long timeout,
int priority)
Creates a new task. |
CmsProject |
createTempfileProject(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject)
Creates a project for the temporary files. |
int |
decrementLinkCountForResource(CmsProject theProject,
String theResourceName)
Decrement the VFS link counter for a resource. |
void |
deleteAllProperties(CmsUser currentUser,
CmsProject currentProject,
String resource)
Deletes all propertyinformation for a file or folder. |
int |
deleteBackups(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
int weeks)
Deletes the versions from the backup tables that are older then the given weeks |
void |
deleteExportLink(CmsExportLink link)
Deletes an exportlink in the database. |
void |
deleteExportLink(String link)
Deletes an exportlink in the database. |
void |
deleteFile(CmsUser currentUser,
CmsProject currentProject,
String filename)
Deletes a file in the Cms. |
void |
deleteFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername)
Deletes a folder in the Cms. |
void |
deleteGroup(CmsUser currentUser,
CmsProject currentProject,
String delgroup)
Delete a group from the Cms. |
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(CmsUser currentUser,
CmsProject currentProject,
int id)
Deletes a project. |
void |
deleteProperty(CmsUser currentUser,
CmsProject currentProject,
String resource,
String property)
Deletes a propertyinformation for a file or folder. |
void |
deletePropertydefinition(CmsUser currentUser,
CmsProject currentProject,
String name,
String resourcetype)
Delete the propertydefinition for the resource type. |
void |
deleteUser(CmsUser currentUser,
CmsProject currentProject,
int userId)
Deletes a user from the Cms. |
void |
deleteUser(CmsUser currentUser,
CmsProject currentProject,
String username)
Deletes a user from the Cms. |
void |
deleteWebUser(CmsUser currentUser,
CmsProject currentProject,
int userId)
Deletes a web user from the Cms. |
void |
destroy()
Destroys the resource broker and required modules and connections. |
String |
digest(String value)
Method to encrypt the passwords. |
void |
endTask(CmsUser currentUser,
CmsProject currentProject,
int taskid)
Ends a task from the Cms. |
void |
exportModuledata(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportChannels,
String[] exportModules,
CmsObject cms,
I_CmsReport report)
Exports channels and moduledata to zip. |
void |
exportResources(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportPaths,
CmsObject cms)
Exports cms-resources to zip. |
void |
exportResources(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportPaths,
CmsObject cms,
boolean excludeSystem,
boolean excludeUnchanged)
Exports cms-resources to zip. |
void |
exportResources(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportPaths,
CmsObject cms,
boolean excludeSystem,
boolean excludeUnchanged,
boolean exportUserdata,
long contentAge,
I_CmsReport report)
Exports cms-resources to zip. |
void |
exportStaticResources(CmsUser currentUser,
CmsProject currentProject,
CmsObject cms,
Vector linksToExport)
Creates a static export in the filesystem. |
void |
exportStaticResources(CmsUser currentUser,
CmsProject currentProject,
CmsObject cms,
Vector startpoints,
Vector projectResources,
Vector allExportedLinks,
CmsPublishedResources changedResources,
I_CmsReport report)
Creates a static export of a Cmsresource in the filesystem |
ArrayList |
fetchVfsLinksForResource(CmsUser theUser,
CmsProject theProject,
String theResourceName)
Fetches all VFS links pointing to a given resource name. |
protected void |
fileSystemChanged(boolean folderChanged)
This method is called, when a resource was changed. |
void |
forwardTask(CmsUser currentUser,
CmsProject currentProject,
int taskid,
String newRoleName,
String newUserName)
Forwards a task to a new user. |
Vector |
getAllAccessibleProjects(CmsUser currentUser,
CmsProject currentProject)
Returns all projects, which are owned by the user or which are accessible for the group of the user. |
Vector |
getAllBackupProjects()
Returns a Vector with all projects from history |
Vector |
getAllExportLinks()
Returns a Vector with all export links |
Vector |
getAllManageableProjects(CmsUser currentUser,
CmsProject currentProject)
Returns all projects, which are owned by the user or which are manageable for the group of the user. |
Hashtable |
getAllResourceTypes(CmsUser currentUser,
CmsProject currentProject)
Returns a Vector 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()
Returns informations about the cache Security: All users are granted, except the anonymous user. |
Vector |
getChild(CmsUser currentUser,
CmsProject currentProject,
String groupname)
Returns all child groups of a group Security: All users are granted, except the anonymous user. |
Vector |
getChilds(CmsUser currentUser,
CmsProject currentProject,
String groupname)
Returns all child groups of a group This method also returns all sub-child groups of the current group. |
source.org.apache.java.util.Configurations |
getConfigurations(CmsUser currentUser,
CmsProject currentProject)
Method to access the configurations of the properties-file. |
Vector |
getDependingExportLinks(Vector res)
Reads all export links that depend on the resource. |
Vector |
getDirectGroupsOfUser(CmsUser currentUser,
CmsProject currentProject,
String username)
Returns the list of groups to which the user directly belongs to Security: All users are granted. |
Vector |
getFilesInFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername)
Returns a Vector with all files of a folder. |
Vector |
getFilesInFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername,
boolean includeDeleted)
Returns a Vector with all files of a folder. |
Vector |
getFilesWithProperty(CmsUser currentUser,
CmsProject currentProject,
String propertyDefinition,
String propertyValue)
Returns a Vector with all resource-names that have set the given property to the given value. |
long |
getFileSystemChanges(CmsUser currentUser,
CmsProject currentProject)
This method can be called, to determine if the file-system was changed in the past. |
long |
getFileSystemFolderChanges(CmsUser currentUser,
CmsProject currentProject)
This method can be called, to determine if the file-system was changed in the past. |
Vector |
getFolderTree(CmsUser currentUser,
CmsProject currentProject,
String rootName)
Returns a Vector with the complete folder-tree for this project. |
Vector |
getGroups(CmsUser currentUser,
CmsProject currentProject)
Returns all groups Security: All users are granted, except the anonymous user. |
Vector |
getGroupsOfUser(CmsUser currentUser,
CmsProject currentProject,
String username)
Returns a list of groups of a user. |
int |
getLimitedWorkplacePort()
This is the port the workplace access is limited to. |
Vector |
getOnlineBrokenLinks()
serches for broken links in the online project. |
CmsGroup |
getParent(CmsUser currentUser,
CmsProject currentProject,
String groupname)
Returns the parent group of a group Security: All users are granted. |
CmsResource |
getParentResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename)
Returns the parent resource of a resouce. |
String |
getReadingpermittedGroup(int projectId,
String resource)
Checks which Group can read the resource and all the parent folders. |
I_CmsRegistry |
getRegistry(CmsUser currentUser,
CmsProject currentProject,
CmsObject cms)
Gets the Registry. |
Vector |
getResourcesInFolder(CmsUser currentUser,
CmsProject currentProject,
String folder)
Returns a Vector with the subresources for a folder. |
Vector |
getResourcesWithProperty(CmsUser currentUser,
CmsProject currentProject,
String propertyDefinition)
Returns a Vector with all resources of the given type that have set the given property to the given value. |
Vector |
getResourcesWithProperty(CmsUser currentUser,
CmsProject currentProject,
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(CmsUser currentUser,
CmsProject currentProject,
int resourceType)
Returns a I_CmsResourceType. |
I_CmsResourceType |
getResourceType(CmsUser currentUser,
CmsProject currentProject,
String resourceType)
Returns a I_CmsResourceType. |
Vector |
getSubFolders(CmsUser currentUser,
CmsProject currentProject,
String foldername)
Returns a Vector with all subfolders. |
Vector |
getSubFolders(CmsUser currentUser,
CmsProject currentProject,
String foldername,
boolean includeDeleted)
Returns a Vector with all subfolders. |
String |
getTaskPar(CmsUser currentUser,
CmsProject currentProject,
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(CmsUser currentUser,
CmsProject currentProject)
Returns all users Security: All users are granted, except the anonymous user. |
Vector |
getUsers(CmsUser currentUser,
CmsProject currentProject,
int type)
Returns all users from a given type Security: All users are granted, except the anonymous user. |
Vector |
getUsers(CmsUser currentUser,
CmsProject currentProject,
int type,
String namestart)
Returns all users from a given type that start with a specified string Security: All users are granted, except the anonymous user. |
Vector |
getUsersByLastname(CmsUser currentUser,
CmsProject currentProject,
String Lastname,
int UserType,
int UserStatus,
int wasLoggedIn,
int nMax)
Gets all users with a certain Lastname. |
Vector |
getUsersOfGroup(CmsUser currentUser,
CmsProject currentProject,
String groupname)
Returns a list of users in a group. |
Vector |
getVisibleResourcesWithProperty(CmsUser currentUser,
CmsProject currentProject,
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. |
protected Vector |
helperGetFilesInFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername,
boolean includeDeleted)
A helper method for this resource-broker. |
protected Vector |
helperGetSubFolders(CmsUser currentUser,
CmsProject currentProject,
String foldername)
A helper method for this resource-broker. |
void |
importFolder(CmsUser currentUser,
CmsProject currentProject,
String importFile,
String importPath,
CmsObject cms)
Imports a import-resource (folder or zipfile) to the cms. |
CmsResource |
importResource(CmsUser currentUser,
CmsProject currentProject,
String newResourceName,
int resourceType,
Map propertyinfos,
int launcherType,
String launcherClassname,
String ownername,
String groupname,
int accessFlags,
long lastmodified,
byte[] filecontent)
Imports a resource. |
void |
importResources(CmsUser currentUser,
CmsProject currentProject,
String importFile,
String importPath,
CmsObject cms,
I_CmsReport report)
Imports a import-resource (folder or zipfile) to the cms. |
int |
incrementLinkCountForResource(CmsProject theProject,
String theResourceName)
Increment the VFS link counter for a resource. |
void |
init(source.org.apache.java.util.Configurations config)
Initializes the resource broker and sets up all required modules and connections. |
boolean |
isAdmin(CmsUser currentUser,
CmsProject currentProject)
Determines, if the users current group is the admin-group. |
boolean |
isHistoryEnabled(CmsObject cms)
Returns true if history is enabled |
boolean |
isManagerOfProject(CmsUser currentUser,
CmsProject currentProject)
Determines, if the users may manage a project. |
boolean |
isProjectManager(CmsUser currentUser,
CmsProject currentProject)
Determines, if the users current group is the projectleader-group. |
boolean |
isUser(CmsUser currentUser,
CmsProject currentProject)
Determines, if the users current group is the projectleader-group. |
protected boolean |
isWebgroup(CmsGroup group)
Checks if this is a valid group for webusers |
ArrayList |
joinLinksToTargets(CmsObject cms,
CmsUser theUser,
CmsProject theProject,
I_CmsReport theReport)
Rebuilds the internal datastructure to join links with their targets. |
void |
linkResourceToTarget(CmsProject theProject,
String theLinkResourceName,
String theTargetResourceName)
Save the ID of the target resource for a VFS link. |
CmsUser |
lockedBy(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Returns the user, who had locked the resource. |
CmsUser |
lockedBy(CmsUser currentUser,
CmsProject currentProject,
String resource)
Returns the user, who had locked the resource. |
void |
lockResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename,
boolean force)
Locks a resource. |
CmsUser |
loginUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
Logs a user into the Cms, if the password is correct. |
CmsUser |
loginWebUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
Logs a web user into the Cms, if the password is correct. |
protected Vector |
mergeResources(Vector offline,
Vector online)
Merges two resource-vectors into one vector. |
void |
moveFile(CmsUser currentUser,
CmsProject currentProject,
String source,
String destination)
Moves the file. |
CmsProject |
onlineProject(CmsUser currentUser,
CmsProject currentProject)
Returns the onlineproject. |
CmsPublishedResources |
publishProject(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
int id,
I_CmsReport report)
Publishes a project. |
CmsUser |
readAgent(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
Reads the agent of a task from the OpenCms. |
Vector |
readAllFileHeaders(CmsUser currentUser,
CmsProject currentProject,
String filename)
Reads all file headers of a file in the OpenCms. |
Vector |
readAllFileHeadersForHist(CmsUser currentUser,
CmsProject currentProject,
String filename)
Reads all file headers of a file in the OpenCms. |
Vector |
readAllProjectResources(int projectId)
select all projectResources from an given project |
Vector |
readAllPropertydefinitions(CmsUser currentUser,
CmsProject currentProject,
int resourceType)
Reads all propertydefinitions for the given resource type. |
Vector |
readAllPropertydefinitions(CmsUser currentUser,
CmsProject currentProject,
String resourcetype)
Reads all propertydefinitions for the given resource type. |
CmsBackupProject |
readBackupProject(CmsUser currentUser,
CmsProject currentProject,
int versionId)
Reads the backupinformation of a project from the Cms. |
String |
readCronTable(CmsUser currentUser,
CmsProject currentProject)
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(CmsUser currentUser,
CmsProject currentProject)
Reads the export-path for the system. |
CmsFile |
readFile(CmsUser currentUser,
CmsProject currentProject,
String filename)
Reads a file from the Cms. |
CmsFile |
readFile(CmsUser currentUser,
CmsProject currentProject,
String filename,
boolean includeDeleted)
Reads a file from the Cms. |
Hashtable |
readFileExtensions(CmsUser currentUser,
CmsProject currentProject)
Gets the known file extensions (=suffixes) Security: All users are granted access |
CmsBackupResource |
readFileForHist(CmsUser currentUser,
CmsProject currentProject,
int versionId,
String filename)
Reads a file from the history of the Cms. |
CmsResource |
readFileHeader(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String filename)
Reads a file header a previous project of the Cms. |
CmsResource |
readFileHeader(CmsUser currentUser,
CmsProject currentProject,
String filename)
Reads a file header from the Cms. |
CmsResource |
readFileHeader(CmsUser currentUser,
CmsProject currentProject,
String filename,
boolean includeDeleted)
Reads a file header from the Cms. |
CmsBackupResource |
readFileHeaderForHist(CmsUser currentUser,
CmsProject currentProject,
int versionId,
String filename)
Reads a file header from the history of the Cms. |
Vector |
readFileHeaders(CmsUser currentUser,
CmsProject currentProject,
int projectId)
Reads all file headers for a project from the Cms. |
Vector |
readFilesByType(CmsUser currentUser,
CmsProject currentProject,
int projectId,
int resourcetype)
Reads all files from the Cms, that are of the given type. |
CmsFolder |
readFolder(CmsUser currentUser,
CmsProject currentProject,
int folderid,
boolean includeDeleted)
Reads a folder from the Cms. |
protected CmsFolder |
readFolder(CmsUser currentUser,
CmsProject currentProject,
int project,
String folder)
Reads a folder from the Cms. |
CmsFolder |
readFolder(CmsUser currentUser,
CmsProject currentProject,
String folder)
Reads a folder from the Cms. |
CmsFolder |
readFolder(CmsUser currentUser,
CmsProject currentProject,
String folder,
boolean includeDeleted)
Reads a folder from the Cms. |
Vector |
readGivenTasks(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String ownerName,
int taskType,
String orderBy,
String sort)
Reads all given tasks from a user for a project. |
CmsGroup |
readGroup(CmsUser currentUser,
CmsProject currentProject,
CmsProject project)
Reads the group of a project from the OpenCms. |
CmsGroup |
readGroup(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Reads the group of a resource from the OpenCms. |
CmsGroup |
readGroup(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
Reads the group (role) of a task from the OpenCms. |
CmsGroup |
readGroup(CmsUser currentUser,
CmsProject currentProject,
int groupid)
Returns a group object. |
CmsGroup |
readGroup(CmsUser currentUser,
CmsProject currentProject,
String groupname)
Returns a group object. |
Hashtable |
readLinkCheckTable(CmsUser currentUser,
CmsProject currentProject)
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(CmsUser currentUser,
CmsProject currentProject,
CmsProject project)
Reads the managergroup of a project from the OpenCms. |
Hashtable |
readMimeTypes(CmsUser currentUser,
CmsProject currentProject)
Gets the MimeTypes. |
Vector |
readOnlineLinkEntrys(int pageId)
returns a Vector (Strings) with the link destinations of all links on the page with the pageId. |
CmsUser |
readOriginalAgent(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
Reads the original agent of a task from the OpenCms. |
CmsUser |
readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsProject project)
Reads the owner of a project from the OpenCms. |
CmsUser |
readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
Reads the owner of a resource from the OpenCms. |
CmsUser |
readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
Reads the owner (initiator) of a task from the OpenCms. |
CmsUser |
readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsTaskLog log)
Reads the owner of a tasklog from the OpenCms. |
CmsProject |
readProject(CmsUser currentUser,
CmsProject currentProject,
CmsResource res)
Reads a project from the Cms. |
CmsProject |
readProject(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
Reads a project from the Cms. |
CmsProject |
readProject(CmsUser currentUser,
CmsProject currentProject,
int id)
Reads a project from the Cms. |
Vector |
readProjectLogs(CmsUser currentUser,
CmsProject currentProject,
int projectid)
Reads log entries for a project. |
Vector |
readProjectView(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String filter)
Reads all file headers of a project from the Cms. |
Map |
readProperties(CmsUser currentUser,
CmsProject currentProject,
String resource,
String siteRoot,
boolean search)
Looks up all properties for a resource with optional direcory upward cascading. |
String |
readProperty(CmsUser currentUser,
CmsProject currentProject,
String resource,
String siteRoot,
String property,
boolean search)
Looks up a specified property with optional direcory upward cascading. |
String |
readProperty(CmsUser currentUser,
CmsProject currentProject,
String resource,
String siteRoot,
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(CmsUser currentUser,
CmsProject currentProject,
String name,
String resourcetype)
Reads a definition for the given resource type. |
Vector |
readResources(CmsProject project)
Insert the method's description here. |
Vector |
readResourcesLikeName(CmsUser currentUser,
CmsProject currentProject,
String resourcename)
Returns a Vector with the resources that contains the given part in the resourcename. |
CmsTask |
readTask(CmsUser currentUser,
CmsProject currentProject,
int id)
Read a task by id. |
Vector |
readTaskLogs(CmsUser currentUser,
CmsProject currentProject,
int taskid)
Reads log entries for a task. |
Vector |
readTasksForProject(CmsUser currentUser,
CmsProject currentProject,
int projectId,
int tasktype,
String orderBy,
String sort)
Reads all tasks for a project. |
Vector |
readTasksForRole(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String roleName,
int tasktype,
String orderBy,
String sort)
Reads all tasks for a role in a project. |
Vector |
readTasksForUser(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String userName,
int taskType,
String orderBy,
String sort)
Reads all tasks for a user in a project. |
CmsUser |
readUser(CmsUser currentUser,
CmsProject currentProject,
int id)
Returns a user object. |
CmsUser |
readUser(CmsUser currentUser,
CmsProject currentProject,
String username)
Returns a user object. |
CmsUser |
readUser(CmsUser currentUser,
CmsProject currentProject,
String username,
int type)
Returns a user object. |
CmsUser |
readUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
Returns a user object if the password for the user is correct. |
CmsUser |
readWebUser(CmsUser currentUser,
CmsProject currentProject,
String username)
Returns a user object if the password for the user is correct. |
CmsUser |
readWebUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
Returns a user object if the password for the user is correct. |
void |
reaktivateTask(CmsUser currentUser,
CmsProject currentProject,
int taskId)
Reaktivates a task from the Cms. |
void |
recoverPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String recoveryPassword,
String newPassword)
Sets a new password only if the user knows his recovery-password. |
void |
removeUserFromGroup(CmsUser currentUser,
CmsProject currentProject,
String username,
String groupname)
Removes a user from a group. |
void |
renameFile(CmsUser currentUser,
CmsProject currentProject,
String oldname,
String newname)
Renames the file to a new name. |
void |
restoreResource(CmsUser currentUser,
CmsProject currentProject,
int versionId,
String filename)
Restores a file in the current project with a version in the backup |
Hashtable |
restoreSession(String oldSessionId)
This method loads old sessiondata from the database. |
void |
setName(CmsUser currentUser,
CmsProject currentProject,
int taskId,
String name)
Set a new name for a task Security: All users are granted. |
void |
setParentGroup(CmsUser currentUser,
CmsProject currentProject,
String groupName,
String parentGroupName)
Sets a new parent-group for an already existing group in the Cms. |
void |
setPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String newPassword)
Sets the password for a user. |
void |
setPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String oldPassword,
String newPassword)
Sets the password for a user. |
void |
setPriority(CmsUser currentUser,
CmsProject currentProject,
int taskId,
int priority)
Set priority of a task Security: All users are granted. |
void |
setRecoveryPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String password,
String newPassword)
Sets the recovery password for a user. |
void |
setTaskPar(CmsUser currentUser,
CmsProject currentProject,
int taskId,
String parName,
String parValue)
Set a Parameter for a task. |
void |
setTimeout(CmsUser currentUser,
CmsProject currentProject,
int taskId,
long timeout)
Set timeout of a task Security: All users are granted. |
boolean |
shouldReloadClasses(int projectId,
Vector classFiles)
This method checks, if there is a classFile marked as changed or deleted. |
void |
storeSession(String sessionId,
Hashtable sessionData)
This method stores sessiondata into the database. |
void |
touch(CmsUser currentUser,
CmsProject currentProject,
String resourceName,
long timestamp)
Access the resource broker underneath to change the timestamp of a resource. |
void |
undeleteResource(CmsUser currentUser,
CmsProject currentProject,
String filename)
Undeletes a file in the Cms. |
void |
undoChanges(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
Undo all changes in the resource, restore the online file. |
void |
unlockProject(CmsUser currentUser,
CmsProject currentProject,
int id)
Unlocks all resources in this project. |
void |
unlockResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename)
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(CmsUser currentUser,
CmsProject currentProject,
String username,
String groupname)
Checks if a user is member of a group. |
protected void |
validFilename(String filename)
Checks ii characters in a String are allowed for filenames |
protected void |
validName(String name,
boolean blank)
Checks ii characters in a String are allowed for names |
protected void |
validTaskname(String taskname)
Checks ii characters in a String are allowed for filenames |
void |
writeCronTable(CmsUser currentUser,
CmsProject currentProject,
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(CmsUser currentUser,
CmsProject currentProject,
String path)
Writes the export-path for the system. |
void |
writeFile(CmsUser currentUser,
CmsProject currentProject,
CmsFile file)
Writes a file to the Cms. |
void |
writeFileExtensions(CmsUser currentUser,
CmsProject currentProject,
Hashtable extensions)
Writes the file extensions Security: Users, which are in the group "Administrators" are authorized. |
void |
writeFileHeader(CmsUser currentUser,
CmsProject currentProject,
CmsFile file)
Writes a fileheader to the Cms. |
void |
writeGroup(CmsUser currentUser,
CmsProject currentProject,
CmsGroup group)
Writes an already existing group in the Cms. |
void |
writeLinkCheckTable(CmsUser currentUser,
CmsProject currentProject,
Hashtable linkchecktable)
Writes the Linkchecktable. |
void |
writeProperties(CmsUser currentUser,
CmsProject currentProject,
String resource,
Map propertyinfos)
Writes a couple of propertyinformation for a file or folder. |
void |
writeProperty(CmsUser currentUser,
CmsProject currentProject,
String resource,
String property,
String value)
Writes a propertyinformation for a file or folder. |
CmsPropertydefinition |
writePropertydefinition(CmsUser currentUser,
CmsProject currentProject,
CmsPropertydefinition propertydef)
Updates the propertydefinition for the resource type. |
void |
writeResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename,
Map properties,
String username,
String groupname,
int accessFlags,
int resourceType,
byte[] filecontent)
Writes a resource and its properties to the Cms. |
void |
writeTaskLog(CmsUser currentUser,
CmsProject currentProject,
int taskid,
String comment)
Writes a new user tasklog for a task. |
void |
writeTaskLog(CmsUser currentUser,
CmsProject currentProject,
int taskid,
String comment,
int type)
Writes a new user tasklog for a task. |
void |
writeUser(CmsUser currentUser,
CmsProject currentProject,
CmsUser user)
Updates the user information. |
void |
writeWebUser(CmsUser currentUser,
CmsProject currentProject,
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 |
| Field Detail |
protected long m_fileSystemChanges
protected long m_fileSystemFolderChanges
protected Hashtable m_resourceTypes
protected source.org.apache.java.util.Configurations m_configuration
protected CmsDbAccess m_dbAccess
protected I_CmsRegistry m_registry
protected int m_limitedWorkplacePort
protected Map m_userCache
protected Map m_groupCache
protected Map m_userGroupsCache
protected Map m_projectCache
protected Map m_propertyCache
protected Map m_propertyDefCache
protected Map m_propertyDefVectorCache
protected Map m_accessCache
protected Map m_resourceCache
protected Map m_resourceListCache
protected static final String C_CACHE_NULL_PROPERTY_VALUE
protected static final String C_CACHE_ALL_PROPERTIES
protected CmsProject m_onlineProjectCache
protected int m_cachelimit
protected String m_refresh
| Constructor Detail |
public CmsResourceBroker()
| Method Detail |
public void acceptTask(CmsUser currentUser,
CmsProject currentProject,
int taskId)
throws CmsException
acceptTask in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if something goes wrong.
public boolean accessCreate(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.
CmsException
public boolean accessCreate(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
throws CmsException
accessCreate in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
protected boolean accessGroup(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource,
int flags)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.flags - The flags to check.
CmsException
public boolean accessLock(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.
CmsException
public boolean accessLock(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
throws CmsException
accessLock in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
protected boolean accessOther(CmsResource resource,
int flags)
throws CmsException
resource - The resource to check.flags - The flags to check.
CmsException
protected boolean accessOwner(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource,
int flags)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.flags - The flags to check.
CmsException
public boolean accessProject(CmsUser currentUser,
CmsProject currentProject,
int projectId)
throws CmsException
accessProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.projectId - the id of the project.
CmsException - Throws CmsException if something goes wrong.
public boolean accessRead(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.
CmsException
public boolean accessRead(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
throws CmsException
accessRead in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public boolean accessUnlock(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.
CmsException
public boolean accessWrite(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.
CmsException
public boolean accessWrite(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
throws CmsException
accessWrite in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public boolean accessWriteUnlocked(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.
CmsException
public void addFileExtension(CmsUser currentUser,
CmsProject currentProject,
String extension,
String resTypeName)
throws CmsException
addFileExtension in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.extension - a file extension like 'html'resTypeName - name of the resource type associated to the extension
CmsException
public CmsGroup addGroup(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
int flags,
String parent)
throws CmsException
addGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name of the new group.description - The description for the new group.flags - The flags for the new group.
CmsException - Throws CmsException if operation was not succesfull.
public CmsUser addUser(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
throws CmsException
addUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the 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)
CmsException - Throws CmsException if operation was not succesfull.
public CmsUser addImportUser(CmsUser currentUser,
CmsProject currentProject,
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
addImportUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name for the user.password - The password for the user.recoveryPassword - The recoveryPassword 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 usersection - The section of the usertype - The type of the user
CmsException - Throws CmsException if operation was not succesfull.
public void addUserToGroup(CmsUser currentUser,
CmsProject currentProject,
String username,
String groupname)
throws CmsException
addUserToGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user that is to be added to the group.groupname - The name of the group.
CmsException - Throws CmsException if operation was not succesfull.
public CmsUser addWebUser(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String name,
String password,
String group,
String description,
Hashtable additionalInfos,
int flags)
throws CmsException
addWebUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the 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)
CmsException - Throws CmsException if operation was not succesfull.
public CmsUser addWebUser(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String name,
String password,
String group,
String additionalGroup,
String description,
Hashtable additionalInfos,
int flags)
throws CmsException
addWebUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.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)
CmsException - Throws CmsException if operation was not succesfull.
public CmsUser anonymousUser(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
anonymousUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful
public void chgrp(CmsUser currentUser,
CmsProject currentProject,
String filename,
String newGroup)
throws CmsException
chgrp in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The complete path to the resource.newGroup - The name of the new group for this resource.
CmsException - Throws CmsException if operation was not succesful.
public void chmod(CmsUser currentUser,
CmsProject currentProject,
String filename,
int flags)
throws CmsException
chmod in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The complete path to the resource.flags - The new accessflags for the resource.
CmsException - Throws CmsException if operation was not succesful.
public void chown(CmsUser currentUser,
CmsProject currentProject,
String filename,
String newOwner)
throws CmsException
chown in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The complete path to the resource.newOwner - The name of the new owner for this resource.
CmsException - Throws CmsException if operation was not succesful.
public void touch(CmsUser currentUser,
CmsProject currentProject,
String resourceName,
long timestamp)
throws CmsException
touch in interface I_CmsResourceBrokercurrentUser - the currentuser who requested this methodcurrentProject - the current project of the userresourceName - the name of the resource to changetimestamp - timestamp the new timestamp of the changed resource
CmsException
public void chstate(CmsUser currentUser,
CmsProject currentProject,
String filename,
int state)
throws CmsException
chstate in interface I_CmsResourceBrokerfilename - The complete path to the resource.state - The new state of this resource.
CmsException - will be thrown, if the user has not the rights
for this resource.
public void chtype(CmsUser currentUser,
CmsProject currentProject,
String filename,
String newType)
throws CmsException
chtype in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The complete path to the resource.newType - The name of the new resourcetype for this resource.
CmsException - Throws CmsException if operation was not succesful.public void clearcache()
clearcache in interface I_CmsResourceBroker
public void copyFile(CmsUser currentUser,
CmsProject currentProject,
String source,
String destination)
throws CmsException
copyFile in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.source - The complete path of the sourcefile.destination - The complete path to the destination.
CmsException - Throws CmsException if operation was not succesful.
public void copyFolder(CmsUser currentUser,
CmsProject currentProject,
String source,
String destination)
throws CmsException
copyFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.source - The complete path of the sourcefolder.destination - The complete path to the destination.
CmsException - Throws CmsException if operation was not succesful.
public void copyResourceToProject(CmsUser currentUser,
CmsProject currentProject,
String resource)
throws CmsException
copyResourceToProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resource - The name of the resource.
CmsException - Throws CmsException if operation was not succesful.
public int countLockedResources(CmsUser currentUser,
CmsProject currentProject,
int id)
throws CmsException
countLockedResources in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.id - The id of the project
CmsException - Throws CmsException if something goes wrong.
public CmsDbAccess createDbAccess(source.org.apache.java.util.Configurations configurations)
throws CmsException
configurations - source.org.apache.java.util.Configurations
CmsException - Thrown if CmsDbAccess class could not be instantiated.
public CmsFile createFile(CmsUser currentUser,
CmsGroup currentGroup,
CmsProject currentProject,
String newFileName,
byte[] contents,
String type,
Map propertyinfos)
throws CmsException
createFile in interface I_CmsResourceBrokercurrentUser - The user who owns this file.currentGroup - The group who owns this file.currentProject - The project in which the resource will be used.contents - The contents of the new file.type - The name of the resourcetype of the new file.propertyinfos - 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.newFileName - The name of the new file with full path information.
CmsException - Throws CmsException if operation was not succesful.
public CmsFolder createFolder(CmsUser currentUser,
CmsGroup currentGroup,
CmsProject currentProject,
String newFolderName,
Map propertyinfos)
throws CmsException
createFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentGroup - The group who requested this method.currentProject - The current project of the user.newFolderName - The name of the new folder (No pathinformation allowed).propertyinfos - 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.
CmsException - will be thrown for missing propertyinfos, for worng propertydefs
or if the filename is not valid. The CmsException will also be thrown, if the
user has not the rights for this resource.
public CmsResource importResource(CmsUser currentUser,
CmsProject currentProject,
String newResourceName,
int resourceType,
Map propertyinfos,
int launcherType,
String launcherClassname,
String ownername,
String groupname,
int accessFlags,
long lastmodified,
byte[] filecontent)
throws CmsException
importResource in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.newResourceName - The name of the new resource (No pathinformation allowed).resourceType - The resourcetype of the new resourcepropertyinfos - 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
CmsException - will be thrown for missing propertyinfos, for worng propertydefs
or if the filename is not valid. The CmsException will also be thrown, if the
user has not the rights for this resource.
public CmsProject createProject(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
String groupname,
String managergroupname)
throws CmsException
createProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name of the project to read.description - The description for the new project.
CmsException - Throws CmsException if something goes wrong.
public CmsProject createProject(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
String groupname,
String managergroupname,
int projecttype)
throws CmsException
createProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name of the project to read.description - The description for the new project.projecttype - the project type (normal or temporary)
CmsException - Throws CmsException if something goes wrong.
public CmsProject createDirectPublishProject(CmsUser currentUser,
CmsProject currentProject,
String name,
String description,
String groupname,
String managergroupname,
int projecttype)
throws CmsException
createDirectPublishProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name of the project to read.description - The description for the new project.
CmsException - Throws CmsException if something goes wrong.
public CmsProject createTempfileProject(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject)
throws CmsException
createTempfileProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if something goes wrong.
public CmsTask createProject(CmsUser currentUser,
String projectName,
int projectType,
String roleName,
long timeout,
int priority)
throws CmsException
createProject in interface I_CmsResourceBrokercurrentUser - User who creates the projectprojectName - Name of the projectprojectType - Type of the Projecttimeout - Time when the Project must finishedpriority - Priority for the Project
CmsException - Throws CmsException if something goes wrong.
public CmsPropertydefinition createPropertydefinition(CmsUser currentUser,
CmsProject currentProject,
String name,
String resourcetype)
throws CmsException
createPropertydefinition in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name of the propertydefinition to overwrite.resourcetype - The name of the resource-type for the propertydefinition.
CmsException - Throws CmsException if something goes wrong.
public CmsTask createTask(CmsUser currentUser,
int projectid,
String agentName,
String roleName,
String taskName,
String taskComment,
int taskType,
long timeout,
int priority)
throws CmsException
createTask in interface I_CmsResourceBrokercurrentUser - The user who requested this method.projectid - The Id of the current project task of the user.agentName - User who will edit the taskroleName - Usergroup for the tasktaskName - Name of the tasktaskType - Type of the tasktaskComment - Description of the tasktimeout - Time when the task must finishedpriority - Id for the priority
CmsException - Throws CmsException if something goes wrong.
public CmsTask createTask(CmsUser currentUser,
CmsProject currentProject,
String agentName,
String roleName,
String taskname,
String taskcomment,
long timeout,
int priority)
throws CmsException
createTask in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskname - Name of the tasktaskcomment - Description of the task.timeout - Time when the task must finishedpriority - Id for the priority
CmsException - Throws CmsException if something goes wrong.
public void deleteAllProperties(CmsUser currentUser,
CmsProject currentProject,
String resource)
throws CmsException
deleteAllProperties in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resource - The name of the resource of which the propertyinformations
have to be deleted.
CmsException - Throws CmsException if operation was not succesful
public void deleteFile(CmsUser currentUser,
CmsProject currentProject,
String filename)
throws CmsException
deleteFile in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The complete path of the file.
CmsException - Throws CmsException if operation was not succesful.
public void deleteFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername)
throws CmsException
deleteFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.foldername - The complete path of the folder.
CmsException - Throws CmsException if operation was not succesful.
public void undeleteResource(CmsUser currentUser,
CmsProject currentProject,
String filename)
throws CmsException
undeleteResource in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The complete path of the file.
CmsException - Throws CmsException if operation was not succesful.
public void deleteGroup(CmsUser currentUser,
CmsProject currentProject,
String delgroup)
throws CmsException
deleteGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.delgroup - The name of the group that is to be deleted.
CmsException - Throws CmsException if operation was not succesfull.
public void deleteProject(CmsUser currentUser,
CmsProject currentProject,
int id)
throws CmsException
deleteProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.id - The id of the project to be published.
CmsException - Throws CmsException if something goes wrong.
public void deleteProperty(CmsUser currentUser,
CmsProject currentProject,
String resource,
String property)
throws CmsException
deleteProperty in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resource - The name of the resource of which the propertyinformation
has to be read.property - The propertydefinition-name of which the propertyinformation has to be set.
CmsException - Throws CmsException if operation was not succesful
public void deletePropertydefinition(CmsUser currentUser,
CmsProject currentProject,
String name,
String resourcetype)
throws CmsException
deletePropertydefinition in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name of the propertydefinition to read.resourcetype - The name of the resource type for which the
propertydefinition is valid.
CmsException - Throws CmsException if something goes wrong.
public void deleteUser(CmsUser currentUser,
CmsProject currentProject,
int userId)
throws CmsException
deleteUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.userId - The Id of the user to be deleted.
CmsException - Throws CmsException if operation was not succesfull.
public void deleteUser(CmsUser currentUser,
CmsProject currentProject,
String username)
throws CmsException
Security: Only users, which are in the group "administrators" are granted.
deleteUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesfull.
public void deleteWebUser(CmsUser currentUser,
CmsProject currentProject,
int userId)
throws CmsException
deleteWebUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.userId - The Id of the user to be deleted.
CmsException - Throws CmsException if operation was not succesfull.
public void destroy()
throws CmsException
destroy in interface I_CmsResourceBrokerCmsException - Throws CmsException if something goes wrong.
public void endTask(CmsUser currentUser,
CmsProject currentProject,
int taskid)
throws CmsException
endTask in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskid - The ID of the task to end.
CmsException - Throws CmsException if something goes wrong.
public void exportResources(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportPaths,
CmsObject cms)
throws CmsException
exportResources in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the userexportFile - the name (absolute Path) of the export resource (zip)cms - the cms-object to use for the export.exportPaths - the name (absolute Path) of folders from which should be exported
Throws - CmsException if something goes wrong.
CmsException
public void exportResources(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportPaths,
CmsObject cms,
boolean excludeSystem,
boolean excludeUnchanged)
throws CmsException
exportResources in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the userexportFile - the name (absolute Path) of the export resource (zip)excludeUnchanged - true, if unchanged files should be excluded.cms - the cms-object to use for the export.exportPaths - the name (absolute Path) of folders from which should be exported
Throws - CmsException if something goes wrong.
CmsException
public void exportResources(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportPaths,
CmsObject cms,
boolean excludeSystem,
boolean excludeUnchanged,
boolean exportUserdata,
long contentAge,
I_CmsReport report)
throws CmsException
exportResources in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the userexportFile - the name (absolute Path) of the export resource (zip)exportPaths - the name (absolute Path) of folders from which should be exportedcms - the cms-object to use for the export.excludeUnchanged - true, if unchanged files should be excluded.contentAge - Max age of content to be exported (timestamp)report - the cmsReport to handle the log messages.
Throws - CmsException if something goes wrong.
CmsException
public void exportModuledata(CmsUser currentUser,
CmsProject currentProject,
String exportFile,
String[] exportChannels,
String[] exportModules,
CmsObject cms,
I_CmsReport report)
throws CmsException
exportModuledata in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the userexportFile - 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 exportedcms - the cms-object to use for the export.
Throws - CmsException if something goes wrong.
CmsExceptionprotected void fileSystemChanged(boolean folderChanged)
public void forwardTask(CmsUser currentUser,
CmsProject currentProject,
int taskid,
String newRoleName,
String newUserName)
throws CmsException
forwardTask in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskid - The Id of the task to forward.
CmsException - Throws CmsException if something goes wrong.
public Vector getAllAccessibleProjects(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
getAllAccessibleProjects in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public Vector getAllManageableProjects(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
getAllManageableProjects in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public Vector getAllBackupProjects()
throws CmsException
getAllBackupProjects in interface I_CmsResourceBrokerCmsException - Throws CmsException if operation was not succesful.
public Vector getAllExportLinks()
throws CmsException
getAllExportLinks in interface I_CmsResourceBrokerCmsException - Throws CmsException if operation was not succesful.
public Hashtable getAllResourceTypes(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
getAllResourceTypes in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
Returns a Hashtable with all I_CmsResourceTypes.
CmsException - Throws CmsException if operation was not succesful.public Hashtable getCacheInfo()
getCacheInfo in interface I_CmsResourceBroker
public Vector getChild(CmsUser currentUser,
CmsProject currentProject,
String groupname)
throws CmsException
getChild in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.groupname - The name of the group.
CmsException - Throws CmsException if operation was not succesful.
public Vector getChilds(CmsUser currentUser,
CmsProject currentProject,
String groupname)
throws CmsException
getChilds in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.groupname - The name of the group.
CmsException - Throws CmsException if operation was not succesful.
public source.org.apache.java.util.Configurations getConfigurations(CmsUser currentUser,
CmsProject currentProject)
getConfigurations in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
public Vector getDirectGroupsOfUser(CmsUser currentUser,
CmsProject currentProject,
String username)
throws CmsException
getDirectGroupsOfUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user.
CmsException - Throws CmsException if operation was not succesful
public Vector getFilesInFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername)
throws CmsException
getFilesInFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.foldername - the complete path to the folder.
CmsException - Throws CmsException if operation was not succesful.
public Vector getFilesInFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername,
boolean includeDeleted)
throws CmsException
getFilesInFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.foldername - the complete path to the folder.includeDeleted - Include the folder if it is deleted
CmsException - Throws CmsException if operation was not succesful.
public Vector getFilesWithProperty(CmsUser currentUser,
CmsProject currentProject,
String propertyDefinition,
String propertyValue)
throws CmsException
getFilesWithProperty in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public long getFileSystemChanges(CmsUser currentUser,
CmsProject currentProject)
getFileSystemChanges in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
public long getFileSystemFolderChanges(CmsUser currentUser,
CmsProject currentProject)
getFileSystemFolderChanges in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
public Vector getFolderTree(CmsUser currentUser,
CmsProject currentProject,
String rootName)
throws CmsException
getFolderTree in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.rootName - The name of the root, e.g. /default/vfs
CmsException - Throws CmsException if operation was not succesful.
public Vector getGroups(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
getGroups in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public Vector getGroupsOfUser(CmsUser currentUser,
CmsProject currentProject,
String username)
throws CmsException
getGroupsOfUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user.
CmsException - Throws CmsException if operation was not succesful
public String getReadingpermittedGroup(int projectId,
String resource)
throws CmsException
getReadingpermittedGroup in interface I_CmsResourceBrokerCmsException
public CmsGroup getParent(CmsUser currentUser,
CmsProject currentProject,
String groupname)
throws CmsException
getParent in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.groupname - The name of the group.
CmsException - Throws CmsException if operation was not succesful.
public CmsResource getParentResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename)
throws CmsException
Security: All users are granted.
getParentResource in interface I_CmsResourceBrokercurrentUser - the user who requested this method.currentProject - the current project of the user.resourcename - the name of the resource to find the parent for
CmsException - if parent resource could not be read
public I_CmsRegistry getRegistry(CmsUser currentUser,
CmsProject currentProject,
CmsObject cms)
throws CmsException
getRegistry in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.cms - The actual CmsObject
Throws - CmsException if access is not allowed.
CmsException
public Vector getResourcesInFolder(CmsUser currentUser,
CmsProject currentProject,
String folder)
throws CmsException
getResourcesInFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.folder - The name of the folder to get the subresources from.
CmsException - Throws CmsException if operation was not succesful.
public Vector getResourcesWithProperty(CmsUser currentUser,
CmsProject currentProject,
String propertyDefinition,
String propertyValue,
int resourceType)
throws CmsException
getResourcesWithProperty in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourceType - The resource type of the resource
CmsException - Throws CmsException if operation was not succesful.
public Vector getResourcesWithProperty(CmsUser currentUser,
CmsProject currentProject,
String propertyDefinition)
throws CmsException
getResourcesWithProperty in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public I_CmsResourceType getResourceType(CmsUser currentUser,
CmsProject currentProject,
int resourceType)
throws CmsException
getResourceType in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourceType - the id of the resourceType to get.
Returns a I_CmsResourceType.
CmsException - Throws CmsException if operation was not succesful.
public I_CmsResourceType getResourceType(CmsUser currentUser,
CmsProject currentProject,
String resourceType)
throws CmsException
getResourceType in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourceType - the name of the resource to get.
Returns a I_CmsResourceType.
CmsException - Throws CmsException if operation was not succesful.
public Vector getSubFolders(CmsUser currentUser,
CmsProject currentProject,
String foldername)
throws CmsException
getSubFolders in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.foldername - the complete path to the folder.
CmsException - Throws CmsException if operation was not succesful.
public Vector getSubFolders(CmsUser currentUser,
CmsProject currentProject,
String foldername,
boolean includeDeleted)
throws CmsException
getSubFolders in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.foldername - the complete path to the folder.includeDeleted - Include the folder if it is deleted
CmsException - Throws CmsException if operation was not succesful.
public String getTaskPar(CmsUser currentUser,
CmsProject currentProject,
int taskId,
String parName)
throws CmsException
getTaskPar in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskId - The Id of the task.parName - Name of the parameter.
CmsException - Throws CmsException if something goes wrong.
public int getTaskType(String taskName)
throws CmsException
getTaskType in interface I_CmsResourceBrokertaskName - Name of the Task
CmsException - Throws CmsException if something goes wrong.
public Vector getUsers(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
getUsers in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public Vector getUsers(CmsUser currentUser,
CmsProject currentProject,
int type)
throws CmsException
getUsers in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.type - The type of the users.
CmsException - Throws CmsException if operation was not succesful.
public Vector getUsers(CmsUser currentUser,
CmsProject currentProject,
int type,
String namestart)
throws CmsException
getUsers in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.type - The type of the users.namestart - The filter for the username
CmsException - Throws CmsException if operation was not succesful.
public Vector getUsersOfGroup(CmsUser currentUser,
CmsProject currentProject,
String groupname)
throws CmsException
getUsersOfGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.groupname - The name of the group to list users from.
CmsException - Throws CmsException if operation was not succesful.
public Vector getUsersByLastname(CmsUser currentUser,
CmsProject currentProject,
String Lastname,
int UserType,
int UserStatus,
int wasLoggedIn,
int nMax)
throws CmsException
getUsersByLastname in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.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.
protected Vector helperGetFilesInFolder(CmsUser currentUser,
CmsProject currentProject,
String foldername,
boolean includeDeleted)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.foldername - the complete path to the folder.
CmsException - Throws CmsException if operation was not succesful.
protected Vector helperGetSubFolders(CmsUser currentUser,
CmsProject currentProject,
String foldername)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project to read the folders from.foldername - the complete path to the folder.
CmsException - Throws CmsException if operation was not succesful.
public void importFolder(CmsUser currentUser,
CmsProject currentProject,
String importFile,
String importPath,
CmsObject cms)
throws CmsException
importFolder in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the userimportFile - the name (absolute Path) of the import resource (zip or folder)importPath - the name (absolute Path) of folder in which should be importedcms - the cms-object to use for the import.
Throws - CmsException if something goes wrong.
CmsException
public void importResources(CmsUser currentUser,
CmsProject currentProject,
String importFile,
String importPath,
CmsObject cms,
I_CmsReport report)
throws CmsException
importResources in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the userimportFile - the name (absolute Path) of the import resource (zip or folder)importPath - the name (absolute Path) of folder in which should be importedcms - the cms-object to use for the import.report - A report object to provide the loggin messages.
Throws - CmsException if something goes wrong.
CmsException
public void init(source.org.apache.java.util.Configurations config)
throws CmsException
init in interface I_CmsResourceBrokerconfig - The OpenCms configuration.
CmsException - Throws CmsException if something goes wrong.
public boolean isAdmin(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
isAdmin in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public boolean isManagerOfProject(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
isManagerOfProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public boolean isProjectManager(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
isProjectManager in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public boolean isUser(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public CmsUser lockedBy(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
lockedBy in interface I_CmsResourceBrokerresource - The resource.
CmsException - will be thrown, if the user has not the rights
for this resource.
public CmsUser lockedBy(CmsUser currentUser,
CmsProject currentProject,
String resource)
throws CmsException
lockedBy in interface I_CmsResourceBrokerresource - The complete path to the resource.
CmsException - will be thrown, if the user has not the rights
for this resource.
public void lockResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename,
boolean force)
throws CmsException
lockResource in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.force - If force is true, a existing locking will be oberwritten.
CmsException - Throws CmsException if operation was not succesful.
It will also be thrown, if there is a existing lock
and force was set to false.
public CmsUser loginUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
throws CmsException
loginUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user to be returned.password - The password of the user to be returned.
CmsException - Throws CmsException if operation was not succesful
public CmsUser loginWebUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
throws CmsException
loginWebUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user to be returned.password - The password of the user to be returned.
CmsException - Throws CmsException if operation was not succesful
protected Vector mergeResources(Vector offline,
Vector online)
offline - The vector with the offline resources.online - The vector with the online resources.
public void moveFile(CmsUser currentUser,
CmsProject currentProject,
String source,
String destination)
throws CmsException
moveFile in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.source - The complete path of the sourcefile.destination - The complete path of the destinationfile.
CmsException - will be thrown, if the file couldn't be moved.
The CmsException will also be thrown, if the user has not the rights
for this resource.
public CmsProject onlineProject(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
onlineProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if something goes wrong.
public void exportStaticResources(CmsUser currentUser,
CmsProject currentProject,
CmsObject cms,
Vector startpoints,
Vector projectResources,
Vector allExportedLinks,
CmsPublishedResources changedResources,
I_CmsReport report)
throws CmsException
exportStaticResources in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the usercms - the cms-object to use for the export.startpoints - the startpoints for the export.report - the cmsReport to handle the log messages.
CmsException - if operation was not successful.
public void exportStaticResources(CmsUser currentUser,
CmsProject currentProject,
CmsObject cms,
Vector linksToExport)
throws CmsException
exportStaticResources in interface I_CmsResourceBrokercurrentUser - user who requestd themethodcurrentProject - current project of the usercms - the cms-object to use for the export.linksToExport - all links that where exported by the master OpenCms.
CmsException - if operation was not successful.
public CmsPublishedResources publishProject(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
int id,
I_CmsReport report)
throws CmsException
publishProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.id - The id of the project to be published.report - A report object to provide the loggin messages.cms - The CmsObject.
CmsException - Throws CmsException if something goes wrong.
public boolean shouldReloadClasses(int projectId,
Vector classFiles)
public CmsUser readAgent(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
throws CmsException
readAgent in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.task - The task to read the agent from.
CmsException - Throws CmsException if operation was not succesful.
public Vector readAllFileHeaders(CmsUser currentUser,
CmsProject currentProject,
String filename)
throws CmsException
readAllFileHeaders in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The name of the file to be read.
CmsException - Throws CmsException if operation was not succesful.
public Vector readAllFileHeadersForHist(CmsUser currentUser,
CmsProject currentProject,
String filename)
throws CmsException
readAllFileHeadersForHist in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The name of the file to be read.
CmsException - Throws CmsException if operation was not succesful.
public Vector readAllProjectResources(int projectId)
throws CmsException
readAllProjectResources in interface I_CmsResourceBrokerCmsException - Throws CmsException if operation was not succesful
public Vector readAllPropertydefinitions(CmsUser currentUser,
CmsProject currentProject,
int resourceType)
throws CmsException
readAllPropertydefinitions in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourceType - The resource type to read the propertydefinitions for.
CmsException - Throws CmsException if something goes wrong.
public Vector readAllPropertydefinitions(CmsUser currentUser,
CmsProject currentProject,
String resourcetype)
throws CmsException
readAllPropertydefinitions in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourcetype - The name of the resource type to read the propertydefinitions for.
CmsException - Throws CmsException if something goes wrong.
public void deleteLinkEntrys(int pageId)
throws CmsException
deleteLinkEntrys in interface I_CmsResourceBrokerpageId - The resourceId (offline) of the page whose links should be deleted
CmsException
public void createLinkEntrys(int pageId,
Vector linkTargets)
throws CmsException
createLinkEntrys in interface I_CmsResourceBrokerpageId - The resourceId (offline) of the page whose liks should be traced.
CmsException
public Vector readLinkEntrys(int pageId)
throws CmsException
readLinkEntrys in interface I_CmsResourceBrokerpageId - The resourceId (offline) of the page whose liks should be read.
CmsException
public void deleteOnlineLinkEntrys(int pageId)
throws CmsException
deleteOnlineLinkEntrys in interface I_CmsResourceBrokerpageId - The resourceId (online) of the page whose links should be deleted
CmsException
public void createOnlineLinkEntrys(int pageId,
Vector linkTarget)
throws CmsException
createOnlineLinkEntrys in interface I_CmsResourceBrokerpageId - 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
readOnlineLinkEntrys in interface I_CmsResourceBrokerpageId - The resourceId (online) of the page whose liks should be read.
CmsException
public Vector getOnlineBrokenLinks()
throws CmsException
getOnlineBrokenLinks in interface I_CmsResourceBrokerCmsException
public void getBrokenLinks(int projectId,
I_CmsReport report,
Vector changed,
Vector deleted,
Vector newRes)
throws CmsException
getBrokenLinks in interface I_CmsResourceBrokerprojectId - 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
updateOnlineProjectLinks in interface I_CmsResourceBrokerdeleted - A Vector (of CmsResources) with the deleted resources of the project.changed - A Vector (of CmsResources) with the changed resources of the project.newRes - A Vector (of CmsResources) with the newRes resources of the project.
CmsException
public String readExportPath(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
readExportPath in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public CmsExportLink readExportLink(String request)
throws CmsException
readExportLink in interface I_CmsResourceBrokerrequest - The request to be read.
CmsException - Throws CmsException if operation was not succesful.
public CmsExportLink readExportLinkHeader(String request)
throws CmsException
readExportLinkHeader in interface I_CmsResourceBrokerrequest - The request to be read.
CmsException - Throws CmsException if operation was not succesful.
public void writeExportLink(CmsExportLink link)
throws CmsException
writeExportLink in interface I_CmsResourceBrokerlink - the cmsexportlink object to write.
CmsException - if something goes wrong.
public void deleteExportLink(String link)
throws CmsException
deleteExportLink in interface I_CmsResourceBrokerlink - the name of the link
CmsException
public void deleteExportLink(CmsExportLink link)
throws CmsException
deleteExportLink in interface I_CmsResourceBrokerlink - the cmsExportLink object to delete.
CmsException
public void writeExportLinkProcessedState(CmsExportLink link)
throws CmsException
writeExportLinkProcessedState in interface I_CmsResourceBrokerlink - the cmsexportlink.
CmsException - if something goes wrong.
public Vector getDependingExportLinks(Vector res)
throws CmsException
getDependingExportLinks in interface I_CmsResourceBrokerCmsException
public CmsFile readFile(CmsUser currentUser,
CmsProject currentProject,
String filename)
throws CmsException
Security: Access is granted, if:
readFile in interface I_CmsResourceBrokercurrentUser - the user who requested this methodcurrentProject - the current project of the userfilename - the name of the file to be read
CmsException - if operation was not succesful
public CmsFile readFile(CmsUser currentUser,
CmsProject currentProject,
String filename,
boolean includeDeleted)
throws CmsException
Security: Access is granted, if:
readFile in interface I_CmsResourceBrokercurrentUser - the user who requested this methodcurrentProject - the current project of the userfilename - the name of the file to be readincludeDeleted - If true the deleted file will be returned, too
CmsException - if operation was not succesful
public Hashtable readFileExtensions(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
readFileExtensions in interface I_CmsResourceBrokercurrentUser - The user who requested this method, not used herecurrentProject - The current project of the user, not used here
CmsException
public CmsResource readFileHeader(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String filename)
throws CmsException
readFileHeader in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.projectId - The id of the project to read the file from.filename - The name of the file to be read.
CmsException - Throws CmsException if operation was not succesful.
public CmsResource readFileHeader(CmsUser currentUser,
CmsProject currentProject,
String filename)
throws CmsException
readFileHeader in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The name of the file to be read.
CmsException - Throws CmsException if operation was not succesful.
public CmsResource readFileHeader(CmsUser currentUser,
CmsProject currentProject,
String filename,
boolean includeDeleted)
throws CmsException
readFileHeader in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.filename - The name of the file to be read.includeDeleted - If false then throw exception if the file is marked as deleted
CmsException - Throws CmsException if operation was not succesful.
public CmsBackupResource readFileHeaderForHist(CmsUser currentUser,
CmsProject currentProject,
int versionId,
String filename)
throws CmsException
readFileHeaderForHist in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.versionId - The id of the version of the file.filename - The name of the file to be read.
CmsException - Throws CmsException if operation was not succesful.
public CmsBackupResource readFileForHist(CmsUser currentUser,
CmsProject currentProject,
int versionId,
String filename)
throws CmsException
readFileForHist in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.versionId - The id of the version of the file.filename - The name of the file to be read.
CmsException - Throws CmsException if operation was not succesful.
public Vector readFileHeaders(CmsUser currentUser,
CmsProject currentProject,
int projectId)
throws CmsException
readFileHeaders in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.projectId - The id of the project to read the resources for.
CmsException - will be thrown, if the file couldn't be read.
The CmsException will also be thrown, if the user has not the rights
for this resource.
protected CmsFolder readFolder(CmsUser currentUser,
CmsProject currentProject,
int project,
String folder)
throws CmsException
currentUser - The user who requested this method.currentProject - The current project of the user.project - the project to read the folder from.
CmsException - will be thrown, if the folder couldn't be read.
The CmsException will also be thrown, if the user has not the rights
for this resource
public CmsFolder readFolder(CmsUser currentUser,
CmsProject currentProject,
String folder)
throws CmsException
readFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.folder - The complete path of the folder to be read.
CmsException - will be thrown, if the folder couldn't be read.
The CmsException will also be thrown, if the user has not the rights
for this resource.
public CmsFolder readFolder(CmsUser currentUser,
CmsProject currentProject,
String folder,
boolean includeDeleted)
throws CmsException
readFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.includeDeleted - Include the folder it it is marked as deletedfolder - The complete pathname of the folder to be read.
CmsException - will be thrown, if the folder couldn't be read.
The CmsException will also be thrown, if the user has not the rights
for this resource.
public CmsFolder readFolder(CmsUser currentUser,
CmsProject currentProject,
int folderid,
boolean includeDeleted)
throws CmsException
readFolder in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.folderid - The id of the folder to be read.includeDeleted - Include the folder it it is marked as deleted
CmsException - will be thrown, if the folder couldn't be read.
The CmsException will also be thrown, if the user has not the rights
for this resource.
public Vector readGivenTasks(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String ownerName,
int taskType,
String orderBy,
String sort)
throws CmsException
readGivenTasks in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.projectId - The id of the Project in which the tasks are defined.orderBy - Chooses, how to order the tasks.
CmsException - Throws CmsException if something goes wrong.
public CmsGroup readGroup(CmsUser currentUser,
CmsProject currentProject,
CmsProject project)
throws CmsException
readGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public CmsGroup readGroup(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
readGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public CmsGroup readGroup(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
throws CmsException
readGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.task - The task to read from.
CmsException - Throws CmsException if operation was not succesful.
public CmsGroup readGroup(CmsUser currentUser,
CmsProject currentProject,
String groupname)
throws CmsException
Security: All users are granted.
readGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.groupname - The name of the group that is to be read.
CmsException - Throws CmsException if operation was not succesful
public CmsGroup readGroup(CmsUser currentUser,
CmsProject currentProject,
int groupid)
throws CmsException
Security: All users are granted.
readGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.groupid - The id of the group that is to be read.
CmsException - Throws CmsException if operation was not succesful
public CmsGroup readManagerGroup(CmsUser currentUser,
CmsProject currentProject,
CmsProject project)
throws CmsException
readManagerGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public Hashtable readMimeTypes(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
readMimeTypes in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public CmsUser readOriginalAgent(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
throws CmsException
readOriginalAgent in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.task - The task to read the original agent from.
CmsException - Throws CmsException if operation was not succesful.
public CmsUser readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsProject project)
throws CmsException
readOwner in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public CmsUser readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
readOwner in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public CmsUser readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
throws CmsException
readOwner in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.task - The task to read the owner from.
CmsException - Throws CmsException if operation was not succesful.
public CmsUser readOwner(CmsUser currentUser,
CmsProject currentProject,
CmsTaskLog log)
throws CmsException
readOwner in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if operation was not succesful.
public CmsProject readProject(CmsUser currentUser,
CmsProject currentProject,
int id)
throws CmsException
readProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.id - The id of the project to read.
CmsException - Throws CmsException if something goes wrong.
public CmsProject readProject(CmsUser currentUser,
CmsProject currentProject,
CmsResource res)
throws CmsException
readProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.res - The resource to read the project of.
CmsException - Throws CmsException if something goes wrong.
public CmsProject readProject(CmsUser currentUser,
CmsProject currentProject,
CmsTask task)
throws CmsException
readProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.task - The task to read the project of.
CmsException - Throws CmsException if something goes wrong.
public Vector readProjectView(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String filter)
throws CmsException
readProjectView in interface I_CmsResourceBrokerprojectId - 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(CmsUser currentUser,
CmsProject currentProject,
int versionId)
throws CmsException
readBackupProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.versionId - The versionId of the project.
CmsException - Throws CmsException if something goes wrong.
public Vector readProjectLogs(CmsUser currentUser,
CmsProject currentProject,
int projectid)
throws CmsException
readProjectLogs in interface I_CmsResourceBrokerprojectid - The id of the projec for tasklog to read.
CmsException - Throws CmsException if something goes wrong.
public String readProperty(CmsUser currentUser,
CmsProject currentProject,
String resource,
String siteRoot,
String property,
boolean search)
throws CmsException
Security: Only a user is granted who has the right to read the resource.
readProperty in interface I_CmsResourceBrokercurrentUser - the current usercurrentProject - the current project of the userresource - 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(CmsUser currentUser,
CmsProject currentProject,
String resource,
String siteRoot,
String property,
boolean search,
String propertyDefault)
throws CmsException
true).Security: Only a user is granted who has the right to read the resource.
readProperty in interface I_CmsResourceBrokercurrentUser - the current usercurrentProject - the current project of the userresource - 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(CmsUser currentUser,
CmsProject currentProject,
String resource,
String siteRoot,
boolean search)
throws CmsException
Security: Only a user is granted who has the right to read the resource.
readProperties in interface I_CmsResourceBrokercurrentUser - the current usercurrentProject - the current project of the userresource - the resource to look up the property forsiteRoot - the current site rootsearch - 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 CmsPropertydefinition readPropertydefinition(CmsUser currentUser,
CmsProject currentProject,
String name,
String resourcetype)
throws CmsException
readPropertydefinition in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The name of the propertydefinition to read.resourcetype - The name of the resource type for which the propertydefinition
is valid.
CmsException - Throws CmsException if something goes wrong.
public Vector readResources(CmsProject project)
throws CmsException
readResources in interface I_CmsResourceBrokerproject - com.opencms.file.CmsProject
CmsException - The exception description.
public CmsTask readTask(CmsUser currentUser,
CmsProject currentProject,
int id)
throws CmsException
readTask in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.id - The id for the task to read.
CmsException - Throws CmsException if something goes wrong.
public Vector readTaskLogs(CmsUser currentUser,
CmsProject currentProject,
int taskid)
throws CmsException
readTaskLogs in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskid - The task for the tasklog to read .
CmsException - Throws CmsException if something goes wrong.
public Vector readTasksForProject(CmsUser currentUser,
CmsProject currentProject,
int projectId,
int tasktype,
String orderBy,
String sort)
throws CmsException
readTasksForProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.projectId - The id of the Project in which the tasks are defined. Can be null for all taskstasktype - Task type you want to read: C_TASKS_ALL, C_TASKS_OPEN, C_TASKS_DONE, C_TASKS_NEWorderBy - Chooses, how to order the tasks.sort - Sort order C_SORT_ASC, C_SORT_DESC, or null
CmsException - Throws CmsException if something goes wrong.
public Vector readTasksForRole(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String roleName,
int tasktype,
String orderBy,
String sort)
throws CmsException
readTasksForRole in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.projectId - The id of the Project in which the tasks are defined.tasktype - Task type you want to read: C_TASKS_ALL, C_TASKS_OPEN, C_TASKS_DONE, C_TASKS_NEW.orderBy - Chooses, how to order the tasks.sort - Sort order C_SORT_ASC, C_SORT_DESC, or null
CmsException - Throws CmsException if something goes wrong.
public Vector readTasksForUser(CmsUser currentUser,
CmsProject currentProject,
int projectId,
String userName,
int taskType,
String orderBy,
String sort)
throws CmsException
readTasksForUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.projectId - The id of the Project in which the tasks are defined.userName - The user who has to process the task.taskType - Task type you want to read: C_TASKS_ALL, C_TASKS_OPEN, C_TASKS_DONE, C_TASKS_NEW.orderBy - Chooses, how to order the tasks.sort - Sort order C_SORT_ASC, C_SORT_DESC, or null
CmsException - Throws CmsException if something goes wrong.
public CmsUser readUser(CmsUser currentUser,
CmsProject currentProject,
int id)
throws CmsException
readUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.id - The id of the user that is to be read.
CmsException - Throws CmsException if operation was not succesful
public CmsUser readUser(CmsUser currentUser,
CmsProject currentProject,
String username)
throws CmsException
readUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user that is to be read.
CmsException - Throws CmsException if operation was not succesful
public CmsUser readUser(CmsUser currentUser,
CmsProject currentProject,
String username,
int type)
throws CmsException
readUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user that is to be read.type - The type of the user.
CmsException - Throws CmsException if operation was not succesful
public CmsUser readUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
throws CmsException
readUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.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 CmsUser readWebUser(CmsUser currentUser,
CmsProject currentProject,
String username)
throws CmsException
readWebUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The username of the user that is to be read.
CmsException - Throws CmsException if operation was not succesful
public CmsUser readWebUser(CmsUser currentUser,
CmsProject currentProject,
String username,
String password)
throws CmsException
readWebUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.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(CmsUser currentUser,
CmsProject currentProject,
int taskId)
throws CmsException
reaktivateTask in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if something goes wrong.
public void recoverPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String recoveryPassword,
String newPassword)
throws CmsException
recoverPassword in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user.recoveryPassword - The recovery password.newPassword - The new password.
CmsException - Throws CmsException if operation was not succesfull.
public void removeUserFromGroup(CmsUser currentUser,
CmsProject currentProject,
String username,
String groupname)
throws CmsException
removeUserFromGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user that is to be removed from the group.groupname - The name of the group.
CmsException - Throws CmsException if operation was not succesful.
public void renameFile(CmsUser currentUser,
CmsProject currentProject,
String oldname,
String newname)
throws CmsException
renameFile in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.oldname - The complete path to the resource which will be renamed.newname - The new name of the resource (CmsUser callingUser, No path information allowed).
CmsException - Throws CmsException if operation was not succesful.
public Hashtable restoreSession(String oldSessionId)
throws CmsException
restoreSession in interface I_CmsResourceBrokeroldSessionId - the id of the old session.
CmsException
public void restoreResource(CmsUser currentUser,
CmsProject currentProject,
int versionId,
String filename)
throws CmsException
restoreResource in interface I_CmsResourceBrokercurrentUser - The current usercurrentProject - The current projectversionId - The version id of the resourcefilename - The name of the file to restore
CmsException - Throws CmsException if operation was not succesful.
public void setName(CmsUser currentUser,
CmsProject currentProject,
int taskId,
String name)
throws CmsException
setName in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.name - The new name value
CmsException - Throws CmsException if something goes wrong.
public void setParentGroup(CmsUser currentUser,
CmsProject currentProject,
String groupName,
String parentGroupName)
throws CmsException
setParentGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.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 - Throws CmsException if operation was not succesfull.
public void setPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String newPassword)
throws CmsException
setPassword in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user.newPassword - The new password.
CmsException - Throws CmsException if operation was not succesfull.
public void setPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String oldPassword,
String newPassword)
throws CmsException
setPassword in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user.oldPassword - The new password.newPassword - The new password.
CmsException - Throws CmsException if operation was not succesfull.
public void setPriority(CmsUser currentUser,
CmsProject currentProject,
int taskId,
int priority)
throws CmsException
setPriority in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if something goes wrong.
public void setRecoveryPassword(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
String username,
String password,
String newPassword)
throws CmsException
setRecoveryPassword in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.username - The name of the user.password - The password of the user.newPassword - The new recoveryPassword to be set.
CmsException - Throws CmsException if operation was not succesfull.
public void setTaskPar(CmsUser currentUser,
CmsProject currentProject,
int taskId,
String parName,
String parValue)
throws CmsException
setTaskPar in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskId - The Id of the task.parName - Name of the parameter.parValue - Value if the parameter.
CmsException - Throws CmsException if something goes wrong.
public void setTimeout(CmsUser currentUser,
CmsProject currentProject,
int taskId,
long timeout)
throws CmsException
setTimeout in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException - Throws CmsException if something goes wrong.
public void storeSession(String sessionId,
Hashtable sessionData)
throws CmsException
storeSession in interface I_CmsResourceBrokersessionId - the id of the session.
CmsException
public void undoChanges(CmsUser currentUser,
CmsProject currentProject,
String resourceName)
throws CmsException
undoChanges in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourceName - The name of the resource to be restored.
CmsException - Throws CmsException if something goes wrong.
public void unlockProject(CmsUser currentUser,
CmsProject currentProject,
int id)
throws CmsException
unlockProject in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.id - The id of the project to be published.
CmsException - Throws CmsException if something goes wrong.
public void unlockResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename)
throws CmsException
unlockResource in interface I_CmsResourceBrokerresourcename - The complete path to the resource to lock.
CmsException - Throws CmsException if operation was not succesful.
public boolean userInGroup(CmsUser currentUser,
CmsProject currentProject,
String username,
String groupname)
throws CmsException
userInGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.groupname - The name of the group to check.
CmsException - Throws CmsException if operation was not succesful
protected void validFilename(String filename)
throws CmsException
filename - String to check
throws - a exception, if the check fails.
CmsException
protected void validTaskname(String taskname)
throws CmsException
throws - a exception, if the check fails.
CmsException
protected void validName(String name,
boolean blank)
throws CmsException
name - String to check
throws - a exception, if the check fails.
CmsException
public void writeExportPath(CmsUser currentUser,
CmsProject currentProject,
String path)
throws CmsException
writeExportPath in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public void writeFile(CmsUser currentUser,
CmsProject currentProject,
CmsFile file)
throws CmsException
writeFile in interface I_CmsResourceBrokercurrentUser - The user who own this file.currentProject - The project in which the resource will be used.file - The name of the file to write.
CmsException - Throws CmsException if operation was not succesful.
public void writeResource(CmsUser currentUser,
CmsProject currentProject,
String resourcename,
Map properties,
String username,
String groupname,
int accessFlags,
int resourceType,
byte[] filecontent)
throws CmsException
writeResource in interface I_CmsResourceBrokercurrentUser - The current user.currentProject - The project in which the resource will be used.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 void writeFileExtensions(CmsUser currentUser,
CmsProject currentProject,
Hashtable extensions)
throws CmsException
writeFileExtensions in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.extensions - Holds extensions as keys and resourcetypes (Stings) as values
CmsException
public void writeFileHeader(CmsUser currentUser,
CmsProject currentProject,
CmsFile file)
throws CmsException
writeFileHeader in interface I_CmsResourceBrokercurrentUser - The user who own this file.currentProject - The project in which the resource will be used.file - The file to write.
CmsException - Throws CmsException if operation was not succesful.
public void writeGroup(CmsUser currentUser,
CmsProject currentProject,
CmsGroup group)
throws CmsException
writeGroup in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.group - The group that should be written to the Cms.
CmsException - Throws CmsException if operation was not succesfull.
public void writeProperties(CmsUser currentUser,
CmsProject currentProject,
String resource,
Map propertyinfos)
throws CmsException
writeProperties in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resource - The name of the resource of which the propertyinformation
has to be read.propertyinfos - A Hashtable with propertydefinition- propertyinfo-pairs as strings.
CmsException - Throws CmsException if operation was not succesful
public void writeProperty(CmsUser currentUser,
CmsProject currentProject,
String resource,
String property,
String value)
throws CmsException
writeProperty in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resource - The name of the resource of which the propertyinformation has
to be read.property - The propertydefinition-name of which the propertyinformation has to be set.value - The value for the propertyinfo to be set.
CmsException - Throws CmsException if operation was not succesful
public CmsPropertydefinition writePropertydefinition(CmsUser currentUser,
CmsProject currentProject,
CmsPropertydefinition propertydef)
throws CmsException
writePropertydefinition in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.propertydef - The propertydef to be deleted.
CmsException - Throws CmsException if something goes wrong.
public void writeTaskLog(CmsUser currentUser,
CmsProject currentProject,
int taskid,
String comment)
throws CmsException
writeTaskLog in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskid - The Id of the task .comment - Description for the log
CmsException - Throws CmsException if something goes wrong.
public void writeTaskLog(CmsUser currentUser,
CmsProject currentProject,
int taskid,
String comment,
int type)
throws CmsException
writeTaskLog in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.taskid - The Id of the task .comment - Description for the log
CmsException - Throws CmsException if something goes wrong.
public void writeUser(CmsUser currentUser,
CmsProject currentProject,
CmsUser user)
throws CmsException
Security: Only users, which are in the group "administrators" are granted.
writeUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.user - The user to be updated.
CmsException - Throws CmsException if operation was not succesful
public void writeWebUser(CmsUser currentUser,
CmsProject currentProject,
CmsUser user)
throws CmsException
writeWebUser in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.user - The user to be updated.
CmsException - Throws CmsException if operation was not succesful
public void changeLockedInProject(int projectId,
String resourcename,
CmsUser currentUser)
throws CmsException
changeLockedInProject in interface I_CmsResourceBrokerresourcename - The name of the resource to change
CmsExceptionpublic boolean isHistoryEnabled(CmsObject cms)
isHistoryEnabled in interface I_CmsResourceBrokercms - The CmsObject
public int getBackupVersionId()
getBackupVersionId in interface I_CmsResourceBroker
public void backupProject(int projectId,
int versionId,
long publishDate,
CmsUser currentUser)
throws CmsException
backupProject in interface I_CmsResourceBrokerversionId - The version of the backuppublishDate - The date of publishing
CmsException - Throws CmsException if operation was not succesful.
protected boolean isWebgroup(CmsGroup group)
throws CmsException
group - The group to be checked
CmsException
public String readCronTable(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
readCronTable in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public void writeCronTable(CmsUser currentUser,
CmsProject currentProject,
String crontable)
throws CmsException
writeCronTable in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
protected void clearResourceCache(String resourcename,
CmsProject currentProject,
CmsUser currentUser)
resourcename - The name of the changed resourceprotected void clearResourceCache()
protected void clearUserCache(CmsUser user)
public String digest(String value)
digest in interface I_CmsResourceBrokervalue - The value to encrypt.
public int getLimitedWorkplacePort()
getLimitedWorkplacePort in interface I_CmsResourceBroker
public void changeUserType(CmsUser currentUser,
CmsProject currentProject,
int userId,
int userType)
throws CmsException
changeUserType in interface I_CmsResourceBrokercurrentUser - The current usercurrentProject - The current projectuserId - The id of the user to changeuserType - The new usertype of the user
CmsException
public void changeUserType(CmsUser currentUser,
CmsProject currentProject,
String username,
int userType)
throws CmsException
changeUserType in interface I_CmsResourceBrokercurrentUser - The current usercurrentProject - The current projectusername - The name of the user to changeuserType - The new usertype of the user
CmsException
public void changeUserType(CmsUser currentUser,
CmsProject currentProject,
CmsUser user,
int userType)
throws CmsException
changeUserType in interface I_CmsResourceBrokercurrentUser - The current usercurrentProject - The current projectuserType - The new usertype of the useruser - The CmsUser object of the user to change
CmsException
public Vector readResourcesLikeName(CmsUser currentUser,
CmsProject currentProject,
String resourcename)
throws CmsException
readResourcesLikeName in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourcename - A part of resourcename
CmsException - Throws CmsException if operation was not succesful.
public Vector readFilesByType(CmsUser currentUser,
CmsProject currentProject,
int projectId,
int resourcetype)
throws CmsException
readFilesByType in interface I_CmsResourceBrokerprojectId - 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(CmsUser currentUser,
CmsProject currentProject,
Hashtable linkchecktable)
throws CmsException
writeLinkCheckTable in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.linkchecktable - The hashtable that contains the links that were not reachable
CmsException
public Hashtable readLinkCheckTable(CmsUser currentUser,
CmsProject currentProject)
throws CmsException
readLinkCheckTable in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.
CmsException
public int deleteBackups(CmsObject cms,
CmsUser currentUser,
CmsProject currentProject,
int weeks)
throws CmsException
deleteBackups in interface I_CmsResourceBrokercms - The CmsObject for reading the registrycurrentUser - The current usercurrentProject - The currently used projectweeks - The number of weeks: the max age of the remaining versions
CmsException
public boolean accessReadVisible(CmsUser currentUser,
CmsProject currentProject,
CmsResource resource)
throws CmsException
accessReadVisible in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resource - The resource to check.
CmsException
public Vector getVisibleResourcesWithProperty(CmsUser currentUser,
CmsProject currentProject,
String propertyDefinition,
String propertyValue,
int resourceType)
throws CmsException
getVisibleResourcesWithProperty in interface I_CmsResourceBrokercurrentUser - The user who requested this method.currentProject - The current project of the user.resourceType - The resource type of the resource
CmsException - Throws CmsException if operation was not succesful.
public ArrayList joinLinksToTargets(CmsObject cms,
CmsUser theUser,
CmsProject theProject,
I_CmsReport theReport)
throws CmsException
joinLinksToTargets in interface I_CmsResourceBrokercms - the current user's CmsObject instancetheUser - the current usertheProject - the current projecttheReport - the report to print the output
CmsExceptionCmsDbAccess.updateResourceFlags(com.opencms.file.CmsProject, int, int),
CmsDbAccess.fetchAllVfsLinks(com.opencms.file.CmsProject, java.util.ArrayList, java.util.ArrayList, java.util.ArrayList, int),
CmsDbAccess.fetchResourceID(com.opencms.file.CmsProject, java.lang.String, int),
CmsDbAccess.updateAllResourceFlags(com.opencms.file.CmsProject, int)
public ArrayList fetchVfsLinksForResource(CmsUser theUser,
CmsProject theProject,
String theResourceName)
throws CmsException
fetchVfsLinksForResource in interface I_CmsResourceBrokertheUser - the current usertheProject - the current projecttheResourceName - the name of the resource of which the VFS links are fetched
CmsException
public int decrementLinkCountForResource(CmsProject theProject,
String theResourceName)
throws CmsException
decrementLinkCountForResource in interface I_CmsResourceBrokertheProject - the current projecttheResourceName - the name of the resource for which the link count is decremented
CmsException
public int incrementLinkCountForResource(CmsProject theProject,
String theResourceName)
throws CmsException
incrementLinkCountForResource in interface I_CmsResourceBrokertheProject - the current projecttheResourceName - the name of the resource for which the link count is incremented
CmsException
public void linkResourceToTarget(CmsProject theProject,
String theLinkResourceName,
String theTargetResourceName)
throws CmsException
linkResourceToTarget in interface I_CmsResourceBrokertheProject - the current projecttheLinkResourceName - 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 | ||||||||||