Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.opencms.file
Interface I_CmsResourceBroker  view I_CmsResourceBroker download I_CmsResourceBroker.java


public interface I_CmsResourceBroker

This interface describes THE resource broker. All DB-specific access modules must implement this interface. The interface is local to package. All methods get additional parameters (callingUser and currentproject) to check the security- police.

Version:
$Revision: 1.201 $ $Date: 2003/04/01 15:20:18 $

Method Summary
 void acceptTask(CmsUser currentUser, CmsProject currentProject, int taskId)
          Accept a task from the Cms.
 boolean accessCreate(CmsUser currentUser, CmsProject currentProject, java.lang.String resourceName)
          Checks, if the user may create this resource.
 boolean accessLock(CmsUser currentUser, CmsProject currentProject, java.lang.String resourceName)
          Checks, if the user may lock this resource.
 boolean accessProject(CmsUser currentUser, CmsProject currentProject, int projectId)
          Tests if the user can access the project.
 boolean accessRead(CmsUser currentUser, CmsProject currentProject, java.lang.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 accessWrite(CmsUser currentUser, CmsProject currentProject, java.lang.String resourceName)
          Checks, if the user may write this resource.
 void addFileExtension(CmsUser currentUser, CmsProject currentProject, java.lang.String extension, java.lang.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, java.lang.String name, java.lang.String description, int flags, java.lang.String parent)
          Add a new group to the Cms.
Only the admin can do this.

Security: Only users, which are in the group "administrators" are granted.

 CmsUser addImportUser(CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String password, java.lang.String recoveryPassword, java.lang.String description, java.lang.String firstname, java.lang.String lastname, java.lang.String email, int flags, java.util.Hashtable additionalInfos, java.lang.String defaultGroup, java.lang.String address, java.lang.String section, int type)
          Adds a user to the Cms by import.
 CmsUser addUser(CmsObject cms, CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String password, java.lang.String group, java.lang.String description, java.util.Hashtable additionalInfos, int flags)
          Adds a user to the Cms.
 void addUserToGroup(CmsUser currentUser, CmsProject currentProject, java.lang.String username, java.lang.String groupname)
          Adds a user to a group.
Only the admin can do this.

Security: Only users, which are in the group "administrators" are granted.

 CmsUser addWebUser(CmsObject cms, CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String password, java.lang.String group, java.lang.String description, java.util.Hashtable additionalInfos, int flags)
          Adds a web user to the Cms.
 CmsUser addWebUser(CmsObject cms, CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String password, java.lang.String group, java.lang.String additionalGroup, java.lang.String description, java.util.Hashtable additionalInfos, int flags)
          Adds a web user to the Cms.
 CmsUser anonymousUser(CmsUser currentUser, CmsProject currentProject)
          Returns the anonymous user object.

Security: All users are granted.

 void backupProject(int projectId, int versionId, long publishDate, CmsUser currentUser)
          Creates a backup of the published project
 void changeLockedInProject(int projectId, java.lang.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, java.lang.String username, int userType)
          Changes the user type of the user Only the administrator can change the type
 void chgrp(CmsUser currentUser, CmsProject currentProject, java.lang.String filename, java.lang.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, java.lang.String filename, int flags)
          Changes the flags for this resource.
Only the flags of a resource in an offline project can be changed.
 void chown(CmsUser currentUser, CmsProject currentProject, java.lang.String filename, java.lang.String newOwner)
          Changes the owner for this resource.
Only the owner of a resource in an offline project can be changed.
 void chstate(CmsUser currentUser, CmsProject currentProject, java.lang.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, java.lang.String filename, java.lang.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.
 void copyFile(CmsUser currentUser, CmsProject currentProject, java.lang.String source, java.lang.String destination)
          Copies a file in the Cms.
 void copyFolder(CmsUser currentUser, CmsProject currentProject, java.lang.String source, java.lang.String destination)
          Copies a folder in the Cms.
 void copyResourceToProject(CmsUser currentUser, CmsProject currentProject, java.lang.String resource)
          Copies a resource from the online project to a new, specified project.
Copying a resource will copy the file header or folder into the specified offline project and set its state to UNCHANGED.
 int countLockedResources(CmsUser currentUser, CmsProject currentProject, int id)
          Counts the locked resources in this project.
 CmsProject createDirectPublishProject(CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String description, java.lang.String groupname, java.lang.String managergroupname, int projecttype)
          Creates a project for the direct publish.
 CmsFile createFile(CmsUser currentUser, CmsGroup currentGroup, CmsProject currentProject, java.lang.String newFileName, byte[] contents, java.lang.String type, java.util.Map propertyinfos)
          Creates a new file with the given content and resourcetype.
 CmsFolder createFolder(CmsUser currentUser, CmsGroup currentGroup, CmsProject currentProject, java.lang.String folderName, java.util.Map propertyinfos)
          Creates a new folder.
 void createLinkEntrys(int pageId, java.util.Vector linkTargets)
          creates a link entry for each of the link targets in the linktable.
 void createOnlineLinkEntrys(int pageId, java.util.Vector linkTarget)
          creates a link entry for each of the link targets in the online linktable.
 CmsProject createProject(CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String description, java.lang.String groupname, java.lang.String managergroupname)
          Creates a project.
 CmsProject createProject(CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String description, java.lang.String groupname, java.lang.String managergroupname, int projecttype)
          Creates a project.
 CmsTask createProject(CmsUser currentUser, java.lang.String projectname, int projectType, java.lang.String roleName, long timeout, int priority)
          Creates a new project for task handling.
 CmsPropertydefinition createPropertydefinition(CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String resourcetype)
          Creates the propertydefinition for the resource type.
Security Only the admin can do this.
 CmsTask createTask(CmsUser currentUser, CmsProject currentProject, java.lang.String agentName, java.lang.String roleName, java.lang.String taskname, java.lang.String taskcomment, long timeout, int priority)
          Creates a new task.
 CmsTask createTask(CmsUser currentUser, int projectid, java.lang.String agentName, java.lang.String roleName, java.lang.String taskname, java.lang.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, java.lang.String theResourceName)
          Decrement the VFS link counter for a resource.
 void deleteAllProperties(CmsUser currentUser, CmsProject currentProject, java.lang.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(java.lang.String link)
          Deletes an exportlink in the database.
 void deleteFile(CmsUser currentUser, CmsProject currentProject, java.lang.String filename)
          Deletes a file in the Cms.
A file can only be deleteed in an offline project.
 void deleteFolder(CmsUser currentUser, CmsProject currentProject, java.lang.String foldername)
          Deletes a folder in the Cms.
Only folders in an offline Project can be deleted.
 void deleteGroup(CmsUser currentUser, CmsProject currentProject, java.lang.String delgroup)
          Delete a group from the Cms.
Only groups that contain no subgroups can be deleted.
 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, java.lang.String resource, java.lang.String property)
          Deletes a propertyinformation for a file or folder.
 void deletePropertydefinition(CmsUser currentUser, CmsProject currentProject, java.lang.String name, java.lang.String resourcetype)
          Delete the propertydefinition for the resource type.
Security Only the admin can do this.
 void deleteUser(CmsUser currentUser, CmsProject currentProject, int userId)
          Deletes a user from the Cms.
 void deleteUser(CmsUser currentUser, CmsProject currentProject, java.lang.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 borker and required modules and connections.
 java.lang.String digest(java.lang.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, java.lang.String exportFile, java.lang.String[] exportChannels, java.lang.String[] exportModules, CmsObject cms, com.opencms.report.I_CmsReport report)
          Exports channels and moduledata to zip.
 void exportResources(CmsUser currentUser, CmsProject currentProject, java.lang.String exportFile, java.lang.String[] exportPaths, CmsObject cms)
          Exports cms-resources to zip.
 void exportResources(CmsUser currentUser, CmsProject currentProject, java.lang.String exportFile, java.lang.String[] exportPaths, CmsObject cms, boolean includeSystem, boolean excludeUnchanged)
          Exports cms-resources to zip.
 void exportResources(CmsUser currentUser, CmsProject currentProject, java.lang.String exportFile, java.lang.String[] exportPaths, CmsObject cms, boolean includeSystem, boolean excludeUnchanged, boolean exportUserdata, long contentAge, com.opencms.report.I_CmsReport report)
          Exports cms-resources to zip.
 void exportStaticResources(CmsUser currentUser, CmsProject currentProject, CmsObject cms, java.util.Vector linksToExport)
          Creates a static export in the filesystem.
 void exportStaticResources(CmsUser currentUser, CmsProject currentProject, CmsObject cms, java.util.Vector startpoints, java.util.Vector projectResources, java.util.Vector allExportedLinks, CmsPublishedResources changedResources, com.opencms.report.I_CmsReport report)
          Creates a static export of a Cmsresource in the filesystem
 java.util.ArrayList fetchVfsLinksForResource(CmsUser theUser, CmsProject theProject, java.lang.String theResourceName)
          Fetches all VFS links pointing to a given resource name.
 void forwardTask(CmsUser currentUser, CmsProject currentProject, int taskid, java.lang.String newRoleName, java.lang.String newUserName)
          Forwards a task to a new user.
 java.util.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.
 java.util.Vector getAllBackupProjects()
          Returns a Vector with all projects from history
 java.util.Vector getAllExportLinks()
          Returns a Vector with all export links
 java.util.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.
 java.util.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, com.opencms.report.I_CmsReport report, java.util.Vector changed, java.util.Vector deleted, java.util.Vector newRes)
          checks a project for broken links that would appear if the project is published.
 java.util.Hashtable getCacheInfo()
          Returns informations about the cache.
 java.util.Vector getChild(CmsUser currentUser, CmsProject currentProject, java.lang.String groupname)
          Returns all child groups of a group

Security: All users are granted, except the anonymous user.

 java.util.Vector getChilds(CmsUser currentUser, CmsProject currentProject, java.lang.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.
 java.util.Vector getDependingExportLinks(java.util.Vector res)
          Reads all export links that depend on the resource.
 java.util.Vector getDirectGroupsOfUser(CmsUser currentUser, CmsProject currentProject, java.lang.String username)
          Returns the list of groups to which the user directly belongs to

Security: All users are granted.

 java.util.Vector getFilesInFolder(CmsUser currentUser, CmsProject currentProject, java.lang.String foldername)
          Returns a Vector with all files of a folder.
Files of a folder can be read from an offline Project and the online Project.
Security: Access is granted, if: the user has access to the project the user can read this resource
 java.util.Vector getFilesInFolder(CmsUser currentUser, CmsProject currentProject, java.lang.String foldername, boolean includeDeleted)
          Returns a Vector with all files of a folder.
Files of a folder can be read from an offline Project and the online Project.
Security: Access is granted, if: the user has access to the project the user can read this resource
 java.util.Vector getFilesWithProperty(CmsUser currentUser, CmsProject currentProject, java.lang.String propertyDefinition, java.lang.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(only Folders) in the past.
 java.util.Vector getFolderTree(CmsUser currentUser, CmsProject currentProject, java.lang.String rootName)
          Returns a Vector with the complete folder-tree for this project.
Subfolders can be read from an offline project and the online project.
 java.util.Vector getGroups(CmsUser currentUser, CmsProject currentProject)
          Returns all groups

Security: All users are granted, except the anonymous user.

 java.util.Vector getGroupsOfUser(CmsUser currentUser, CmsProject currentProject, java.lang.String username)
          Returns a list of groups of a user.

Security: All users are granted.

 int getLimitedWorkplacePort()
          This is the port the workplace access is limited to.
 java.util.Vector getOnlineBrokenLinks()
          serches for broken links in the online project.
 CmsGroup getParent(CmsUser currentUser, CmsProject currentProject, java.lang.String groupname)
          Returns the parent group of a group

Security: All users are granted, except the anonymous user.

 CmsResource getParentResource(CmsUser currentUser, CmsProject currentProject, java.lang.String resourcename)
          Returns the parent resource of a resouce.
 java.lang.String getReadingpermittedGroup(int projectId, java.lang.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.
 java.util.Vector getResourcesInFolder(CmsUser currentUser, CmsProject currentProject, java.lang.String folder)
          Returns a Vector with the subresources for a folder.
Security: Access is granted, if: the user has access to the project the user can read this resource
 java.util.Vector getResourcesWithProperty(CmsUser currentUser, CmsProject currentProject, java.lang.String propertyDefinition)
          Returns a Vector with all resources of the given type that have set the given property to the given value.
 java.util.Vector getResourcesWithProperty(CmsUser currentUser, CmsProject currentProject, java.lang.String propertyDefinition, java.lang.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 CmsResourceTypes.
 I_CmsResourceType getResourceType(CmsUser currentUser, CmsProject currentProject, java.lang.String resourceType)
          Returns a CmsResourceTypes.
 java.util.Vector getSubFolders(CmsUser currentUser, CmsProject currentProject, java.lang.String foldername)
          Returns a Vector with all subfolders.
Subfolders can be read from an offline project and the online project.
 java.util.Vector getSubFolders(CmsUser currentUser, CmsProject currentProject, java.lang.String foldername, boolean includeDeleted)
          Returns a Vector with all subfolders.
Subfolders can be read from an offline project and the online project.
 java.lang.String getTaskPar(CmsUser currentUser, CmsProject currentProject, int taskid, java.lang.String parname)
          Get a parameter value for a task.
 int getTaskType(java.lang.String taskname)
          Get the template task id fo a given taskname.
 java.util.Vector getUsers(CmsUser currentUser, CmsProject currentProject)
          Returns all users

Security: All users are granted, except the anonymous user.

 java.util.Vector getUsers(CmsUser currentUser, CmsProject currentProject, int type)
          Returns all users from a given type

Security: All users are granted, except the anonymous user.

 java.util.Vector getUsers(CmsUser currentUser, CmsProject currentProject, int type, java.lang.String namestart)
          Returns all users from a given type that start with a specified string

Security: All users are granted, except the anonymous user.

 java.util.Vector getUsersByLastname(CmsUser currentUser, CmsProject currentProject, java.lang.String Lastname, int UserType, int UserStatus, int wasLoggedIn, int nMax)
          Gets all users with a certain Lastname.
 java.util.Vector getUsersOfGroup(CmsUser currentUser, CmsProject currentProject, java.lang.String groupname)
          Returns a list of users in a group.

Security: All users are granted, except the anonymous user.

 java.util.Vector getVisibleResourcesWithProperty(CmsUser currentUser, CmsProject currentProject, java.lang.String propertyDefinition, java.lang.String propertyValue, int resourceType)
          Returns a Vector with all resources of the given type that have set the given property to the given value.
 void importFolder(CmsUser currentUser, CmsProject currentProject, java.lang.String importFile, java.lang.String importPath, CmsObject cms)
          Imports a import-resource (folder or zipfile) to the cms.
 CmsResource importResource(CmsUser currentUser, CmsProject currentProject, java.lang.String newResourceName, int resourceType, java.util.Map propertyinfos, int launcherType, java.lang.String launcherClassname, java.lang.String ownername, java.lang.String groupname, int accessFlags, long lastmodified, byte[] filecontent)
          Creates a new resource.
 void importResources(CmsUser currentUser, CmsProject currentProject, java.lang.String importFile, java.lang.String importPath, CmsObject cms, com.opencms.report.I_CmsReport report)
          Imports a import-resource (folder or zipfile) to the cms.
 int incrementLinkCountForResource(CmsProject theProject, java.lang.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)
          Check if the history is enabled
 boolean isManagerOfProject(CmsUser currentUser, CmsProject currentProject)
          Determines, if the users may manage a project.
Only the manager of a project may publish it.
 boolean isProjectManager(CmsUser currentUser, CmsProject currentProject)
          Determines, if the users current group is the projectleader-group.
All projectleaders can create new projects, or close their own projects.
 java.util.ArrayList joinLinksToTargets(CmsObject cms, CmsUser theUser, CmsProject theProject, com.opencms.report.I_CmsReport theReport)
          Rebuilds the internal datastructure to join links with their targets.
 void linkResourceToTarget(CmsProject theProject, java.lang.String theLinkResourceName, java.lang.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.
A user can lock a resource, so he is the only one who can write this resource.
 CmsUser lockedBy(CmsUser currentUser, CmsProject currentProject, java.lang.String resource)
          Returns the user, who had locked the resource.
A user can lock a resource, so he is the only one who can write this resource.
 void lockResource(CmsUser currentUser, CmsProject currentProject, java.lang.String resourcename, boolean force)
          Locks a resource.
Only a resource in an offline project can be locked.
 CmsUser loginUser(CmsUser currentUser, CmsProject currentProject, java.lang.String username, java.lang.String password)
          Logs a user into the Cms, if the password is correct.
 CmsUser loginWebUser(CmsUser currentUser, CmsProject currentProject, java.lang.String username, java.lang.String password)
          Logs a web user into the Cms, if the password is correct.
 void moveFile(CmsUser currentUser, CmsProject currentProject, java.lang.String source, java.lang.String destination)
          Moves the file.
 CmsProject onlineProject(CmsUser currentUser, CmsProject currentProject)
          Returns the onlineproject.
 CmsPublishedResources publishProject(CmsObject cms, CmsUser currentUser, CmsProject currentProject, int id, com.opencms.report.I_CmsReport report)
          Publishes a project.
 CmsUser readAgent(CmsUser currentUser, CmsProject currentProject, CmsTask task)
          Reads the agent of a task from the OpenCms.
 java.util.Vector readAllFileHeaders(CmsUser currentUser, CmsProject currentProject, java.lang.String filename)
          Reads all file headers of a file in the OpenCms.
This method returns a vector with all file headers, i.e.
 java.util.Vector readAllFileHeadersForHist(CmsUser currentUser, CmsProject currentProject, java.lang.String filename)
          Reads all file headers of a file in the OpenCms.
This method returns a vector with the histroy of all file headers, i.e.
 java.util.Vector readAllProjectResources(int projectId)
          select all projectResources from an given project
 java.util.Vector readAllPropertydefinitions(CmsUser currentUser, CmsProject currentProject, int resourcetype)
          Reads all propertydefinitions for the given resource type.
 java.util.Vector readAllPropertydefinitions(CmsUser currentUser, CmsProject currentProject, java.lang.String resourcetype)
          Reads all propertydefinitions for the given resource type.
 CmsBackupProject readBackupProject(CmsUser currentUser, CmsProject currentProject, int versionId)
          Reads the backup of a project from the Cms.
 java.lang.String readCronTable(CmsUser currentUser, CmsProject currentProject)
          Gets the Crontable.
 CmsExportLink readExportLink(java.lang.String filename)
          Reads a exportrequest from the Cms.
 CmsExportLink readExportLinkHeader(java.lang.String request)
          Reads a exportrequest without the dependencies from the Cms.
 java.lang.String readExportPath(CmsUser currentUser, CmsProject currentProject)
          Reads the export-path for the system.
 CmsFile readFile(CmsUser currentUser, CmsProject currentProject, java.lang.String filename)
          Reads a file from the Cms.
Security: Access is granted, if: the user has access to the project the user can read the resource
 CmsFile readFile(CmsUser currentUser, CmsProject currentProject,