Java Doc for CmsDriverManager.java in  » Content-Management-System » opencms » org » opencms » db » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » opencms » org.opencms.db 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.opencms.db.CmsDriverManager

CmsDriverManager
final public class CmsDriverManager implements I_CmsEventListener(Code)
The OpenCms driver manager.


author:
   Alexander Kandzior
author:
   Thomas Weckert
author:
   Carsten Weinholz
author:
   Michael Emmerich
author:
   Michael Moossen
since:
   6.0.0



Field Summary
final public static  StringCACHE_ALL_PROPERTIES
     Cache key for all properties.
final public static  intCHANGED_ACCESSCONTROL
     Value to indicate a change in access control entries of a resource.
final public static  intCHANGED_CONTENT
     Value to indicate a content change.
final public static  intCHANGED_LASTMODIFIED
     Value to indicate a change in the lastmodified settings of a resource.
final public static  intCHANGED_RESOURCE
     Value to indicate a change in the resource data.
final public static  intCHANGED_TIMEFRAME
     Value to indicate a change in the availability timeframe.
final public static  StringCONFIGURATION_BACKUP
     "driver.backup" string in the configuration-file.
final public static  StringCONFIGURATION_CACHE
     "cache" string in the configuration-file.
final public static  StringCONFIGURATION_DB
     "db" string in the configuration-file.
final public static  StringCONFIGURATION_HISTORY
     "driver.history" string in the configuration-file.
final public static  StringCONFIGURATION_PROJECT
     "driver.project" string in the configuration-file.
final public static  StringCONFIGURATION_USER
     "driver.user" string in the configuration-file.
final public static  StringCONFIGURATION_VFS
     "driver.vfs" string in the configuration-file.
final public static  StringLOST_AND_FOUND_FOLDER
     The vfs path of the loast and found folder.
final public static  intMAX_VFS_RESOURCE_PATH_LENGTH
     The maximum length of a VFS resource path.
final public static  intNOTHING_CHANGED
     Key for indicating no changes.
final public static  intREADMODE_EXCLUDE_STATE
     Indicates to match resources NOT having the given state.
final public static  intREADMODE_EXCLUDE_TREE
     Indicates to match immediate children only.
final public static  intREADMODE_EXCLUDE_TYPE
     Indicates to match resources NOT having the given type.
final public static  intREADMODE_IGNORESTATE
     Mode for reading project resources from the db.
final public static  intREADMODE_INCLUDE_PROJECT
     Indicates to match resources in given project only.
final public static  intREADMODE_INCLUDE_TREE
     Indicates to match all successors.
final public static  intREADMODE_MATCHSTATE
     Mode for reading project resources from the db.
final public static  intREADMODE_ONLY_FILES
     Indicates if only file resources should be read.
final public static  intREADMODE_ONLY_FOLDERS
     Indicates if only folder resources should be read.
final public static  intREADMODE_UNMATCHSTATE
     Mode for reading project resources from the db.
final public static  StringREAD_IGNORE_PARENT
     Indicates to ignore the resource path when matching resources.
final public static  longREAD_IGNORE_TIME
     Indicates to ignore the time value.
final public static  intREAD_IGNORE_TYPE
     Indicates to ignore the resource type when matching resources.
final public static  StringTEMP_FILE_PREFIX
     Prefix char for temporary files in the VFS.
final public static  intUPDATE_ALL
     Key to indicate complete update.
final public static  intUPDATE_RESOURCE
     Key to indicate update of resource record.
final public static  intUPDATE_RESOURCE_PROJECT
     Key to indicate update of last modified project reference.
final public static  intUPDATE_RESOURCE_STATE
     Key to indicate update of resource state.
final public static  intUPDATE_RESOURCE_STATE_CONTENT
     Key to indicate update of resource state including the content date.
final public static  intUPDATE_STRUCTURE
     Key to indicate update of structure record.
final public static  intUPDATE_STRUCTURE_STATE
     Key to indicate update of structure state.


Method Summary
public  voidaddRelationToResource(CmsDbContext dbc, CmsResource resource, CmsResource target, CmsRelationType type, boolean importCase)
    
public  voidaddResourceToOrgUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsResource resource)
    
public  voidaddUserToGroup(CmsDbContext dbc, String username, String groupname, boolean readRoles)
    
public  voidchangeLock(CmsDbContext dbc, CmsResource resource, CmsLockType lockType)
    
public  ListchangeResourcesInFolderWithProperty(CmsDbContext dbc, CmsResource resource, String propertyDefinition, String oldValue, String newValue, boolean recursive)
     Returns a list with all sub resources of a given folder that have set the given property, matching the current property's value with the given old value and replacing it by a given new value.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource on which property definition values are changed
Parameters:
  propertyDefinition - the name of the propertydefinition to change the value
Parameters:
  oldValue - the old value of the propertydefinition
Parameters:
  newValue - the new value of the propertydefinition
Parameters:
  recursive - if true, change recursively all property values on sub-resources (only for folders) a list with the CmsResource's where the property value has been changed
throws:
  CmsVfsException - for now only when the search for the oldvalue failed.

public  voidchflags(CmsDbContext dbc, CmsResource resource, int flags)
     Changes the resource flags of a resource.

The resource flags are used to indicate various "special" conditions for a resource.

public  voidchtype(CmsDbContext dbc, CmsResource resource, int type)
     Changes the resource type of a resource.

OpenCms handles resources according to the resource type, not the file suffix.

public  voidcmsEvent(CmsEvent event)
    
protected  CmsFolderconvertResourceToFolder(CmsResource resource)
    
public  voidcopyAccessControlEntries(CmsDbContext dbc, CmsResource source, CmsResource destination, boolean updateLastModifiedInfo)
    
public  voidcopyResource(CmsDbContext dbc, CmsResource source, String destination, CmsResource.CmsResourceCopyMode siblingMode)
     Copies a resource.

You must ensure that the destination path is an absolute, valid and existing VFS path.

public  voidcopyResourceToProject(CmsDbContext dbc, CmsResource resource)
    
public  intcountLockedResources(CmsProject project)
    
public  CmsGroupcreateGroup(CmsDbContext dbc, CmsUUID id, String name, String description, int flags, String parent)
     Add a new group to the Cms.

Only the admin can do this.

public  CmsOrganizationalUnitcreateOrganizationalUnit(CmsDbContext dbc, String ouFqn, String description, int flags, CmsResource resource)
    
public  CmsProjectcreateProject(CmsDbContext dbc, String name, String description, String groupname, String managergroupname, CmsProject.CmsProjectType projecttype)
    
public  CmsPropertyDefinitioncreatePropertyDefinition(CmsDbContext dbc, String name)
    
public  voidcreatePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob)
    
public synchronized  CmsResourcecreateResource(CmsDbContext dbc, String resourcePath, CmsResource resource, byte[] content, List properties, boolean importCase)
     Creates a new resource with the provided content and properties.

The content parameter may be null if the resource id already exists.

public  CmsResourcecreateResource(CmsDbContext dbc, String resourcename, int type, byte[] content, List properties)
    
public  CmsResourcecreateSibling(CmsDbContext dbc, CmsResource source, String destination, List properties)
    
public  CmsProjectcreateTempfileProject(CmsDbContext dbc)
    
public  CmsUsercreateUser(CmsDbContext dbc, String name, String password, String description, Map additionalInfos)
    
public  voiddeleteAllProperties(CmsDbContext dbc, String resourcename)
     Deletes all property values of a file or folder.

If there are no other siblings than the specified resource, both the structure and resource property values get deleted.

public  voiddeleteAllStaticExportPublishedResources(CmsDbContext dbc, int linkType)
    
public  voiddeleteGroup(CmsDbContext dbc, CmsGroup group, CmsUUID replacementId)
    
public  voiddeleteHistoricalVersions(CmsDbContext dbc, CmsFolder folder, int versionsToKeep, int versionsDeleted, long timeDeleted, I_CmsReport report)
    
public  voiddeleteOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit)
    
public  voiddeleteProject(CmsDbContext dbc, CmsProject deleteProject)
     Deletes a project.

Only the admin or the owner of the project can do this.

public  voiddeletePropertyDefinition(CmsDbContext dbc, String name)
    
public  voiddeletePublishJob(CmsDbContext dbc, CmsUUID publishHistoryId)
    
public  voiddeletePublishList(CmsDbContext dbc, CmsUUID publishHistoryId)
    
public  voiddeleteRelationsForResource(CmsDbContext dbc, CmsResource resource, CmsRelationFilter filter)
    
protected  voiddeleteRelationsWithSiblings(CmsDbContext dbc, CmsResource resource)
    
public  voiddeleteResource(CmsDbContext dbc, CmsResource resource, CmsResource.CmsResourceDeleteMode siblingMode)
     Deletes a resource.

The siblingMode parameter controls how to handle siblings during the delete operation.

public  voiddeleteStaticExportPublishedResource(CmsDbContext dbc, String resourceName, int linkType, String linkParameter)
    
public  voiddeleteUser(CmsDbContext dbc, CmsProject project, String username, String replacementUsername)
    
public  voiddestroy()
    
public  booleanexistsResourceId(CmsDbContext dbc, CmsUUID resourceId)
    
public  voidfillPublishList(CmsDbContext dbc, CmsPublishList publishList)
    
public  ListgetAccessControlEntries(CmsDbContext dbc, CmsResource resource, boolean getInherited)
    
public  CmsAccessControlListgetAccessControlList(CmsDbContext dbc, CmsResource resource)
    
public  CmsAccessControlListgetAccessControlList(CmsDbContext dbc, CmsResource resource, boolean inheritedOnly)
     Returns the access control list of a given resource.

If inheritedOnly is set, only inherited access control entries are returned.

Note: For file resources, *all* permissions set at the immediate parent folder are inherited, not only these marked to inherit.

public  intgetActiveConnections(String dbPoolUrl)
    
public  ListgetAllAccessibleProjects(CmsDbContext dbc)
    
public  ListgetAllHistoricalProjects(CmsDbContext dbc)
    
public  ListgetAllManageableProjects(CmsDbContext dbc)
    
public  ListgetChildren(CmsDbContext dbc, CmsGroup group, boolean includeSubChildren)
    
public  ListgetGroups(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, boolean includeSubOus, boolean readRoles)
    
public  ListgetGroupsOfUser(CmsDbContext dbc, String username, boolean readRoles)
    
public  ListgetGroupsOfUser(CmsDbContext dbc, String username, String ouFqn, boolean includeChildOus, boolean readRoles, boolean directGroupsOnly, String remoteAddress)
    
public  I_CmsHistoryDrivergetHistoryDriver()
    
public  intgetIdleConnections(String dbPoolUrl)
    
public  CmsLockgetLock(CmsDbContext dbc, CmsResource resource)
    
protected  CmsLockManagergetLockManager()
    
public  ListgetLockedResources(CmsDbContext dbc, CmsResource resource, CmsLockFilter filter)
    
public  intgetNextPublishTag(CmsDbContext dbc)
    
public  ListgetOrgUnitsForRole(CmsDbContext dbc, CmsRole role, boolean includeSubOus)
    
public  ListgetOrganizationalUnits(CmsDbContext dbc, CmsOrganizationalUnit parent, boolean includeChildren)
    
public  CmsGroupgetParent(CmsDbContext dbc, String groupname)
    
public  CmsPermissionSetCustomgetPermissions(CmsDbContext dbc, CmsResource resource, CmsUser user)
    
public  I_CmsProjectDrivergetProjectDriver()
    
public  CmsUUIDgetProjectId(CmsDbContext dbc, int id)
    
public  ExtendedPropertiesgetPropertyConfiguration()
    
public  CmsPublishListgetRelatedResourcesToPublish(CmsDbContext dbc, CmsPublishList publishList, CmsRelationFilter filter)
    
public  ListgetRelationsForResource(CmsDbContext dbc, CmsResource resource, CmsRelationFilter filter)
    
public  ListgetResourcesForOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit)
    
public  ListgetResourcesForPrincipal(CmsDbContext dbc, CmsProject project, CmsUUID principalId, CmsPermissionSet permissions, boolean includeAttr)
    
public  ListgetRolesForResource(CmsDbContext dbc, CmsUser user, CmsResource resource)
    
public  ListgetRolesForUser(CmsDbContext dbc, CmsUser user)
    
public  CmsSecurityManagergetSecurityManager()
    
public  CmsSqlManagergetSqlManager()
    
public  I_CmsUserDrivergetUserDriver()
    
public  ListgetUsers(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, boolean recursive)
    
public  ListgetUsersOfGroup(CmsDbContext dbc, String groupname, boolean includeOtherOuUsers, boolean directUsersOnly, boolean readRoles)
     Returns a list of users in a group.


Parameters:
  dbc - the current database context
Parameters:
  groupname - the name of the group to list users from
Parameters:
  includeOtherOuUsers - include users of other organizational units
Parameters:
  directUsersOnly - if set only the direct assigned users will be returned, if not also indirect users, ie.

public  I_CmsVfsDrivergetVfsDriver()
    
public  voidimportAccessControlEntries(CmsDbContext dbc, CmsResource resource, List acEntries)
     Writes a vector of access control entries as new access control entries of a given resource.

Already existing access control entries of this resource are removed before.

public  CmsUserimportUser(CmsDbContext dbc, String id, String name, String password, String firstname, String lastname, String email, int flags, long dateCreated, Map additionalInfos)
    
public  voidinit(CmsConfigurationManager configurationManager)
    
public  booleanisInsideCurrentProject(CmsDbContext dbc, String resourcename)
     Checks if the specified resource is inside the current project.

The project "view" is determined by a set of path prefixes.

public  booleanisTempfileProject(CmsProject project)
    
public  booleanlabelResource(CmsDbContext dbc, CmsResource resource, String newResource, int action)
    
public  voidlockResource(CmsDbContext dbc, CmsResource resource, CmsLockType type)
    
public  CmsUserlockedBy(CmsDbContext dbc, 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.

public  CmsUserloginUser(CmsDbContext dbc, String userName, String password, String remoteAddress)
    
public  I_CmsPrincipallookupPrincipal(CmsDbContext dbc, CmsUUID principalId)
    
public  I_CmsPrincipallookupPrincipal(CmsDbContext dbc, String principalName)
    
public  voidmoveResource(CmsDbContext dbc, CmsResource source, String destination, boolean internal)
     Moves a resource.

You must ensure that the parent of the destination path is an absolute, valid and existing VFS path.

public  StringmoveToLostAndFound(CmsDbContext dbc, CmsResource resource, boolean returnNameOnly)
     Moves a resource to the "lost and found" folder.

The method can also be used to check get the name of a resource in the "lost and found" folder only without actually moving the the resource.

public  ObjectnewDriverInstance(CmsConfigurationManager configurationManager, String driverName, List successiveDrivers)
    
public  ObjectnewDriverInstance(ExtendedProperties configuration, String driverName, String driverPoolUrl)
    
public static  CmsDriverManagernewInstance(CmsConfigurationManager configurationManager, CmsSecurityManager securityManager, I_CmsDbContextFactory runtimeInfoFactory, CmsPublishEngine publishEngine)
    
public  voidnewPoolInstance(Map configuration, String poolName)
    
public  voidpublishJob(CmsObject cms, CmsDbContext dbc, CmsPublishList publishList, I_CmsReport report)
    
public synchronized  voidpublishProject(CmsObject cms, CmsDbContext dbc, CmsPublishList publishList, I_CmsReport report)
    
public  CmsAccessControlEntryreadAccessControlEntry(CmsDbContext dbc, CmsResource resource, CmsUUID principal)
     Reads an access control entry from the cms.

The access control entries of a resource are readable by everyone.

public  ListreadAllAvailableVersions(CmsDbContext dbc, CmsResource resource)
     Reads all versions of the given resource.
This method returns a list with the history of the given resource, i.e.
public  ListreadAllPropertyDefinitions(CmsDbContext dbc)
    
public  ListreadChildResources(CmsDbContext dbc, CmsResource resource, CmsResourceFilter filter, boolean getFolders, boolean getFiles, boolean checkPermissions)
    
public  CmsResourcereadDefaultFile(CmsDbContext dbc, CmsResource resource)
    
public  ListreadDeletedResources(CmsDbContext dbc, CmsResource resource, boolean readTree, boolean isVfsManager)
    
public  CmsFilereadFile(CmsDbContext dbc, CmsResource resource)
     Reads a file resource (including it's binary content) from the VFS, using the specified resource filter.

In case you do not need the file content, use CmsDriverManager.readResource(CmsDbContext,String,CmsResourceFilter) instead.

The specified filter controls what kind of resources should be "found" during the read operation.

public  CmsFolderreadFolder(CmsDbContext dbc, String resourcename, CmsResourceFilter filter)
    
public  CmsGroupreadGroup(CmsDbContext dbc, CmsProject project)
    
public  CmsGroupreadGroup(CmsDbContext dbc, CmsUUID groupId)
    
public  CmsGroupreadGroup(CmsDbContext dbc, String groupname)
    
public  CmsHistoryPrincipalreadHistoricalPrincipal(CmsDbContext dbc, CmsUUID principalId)
     Reads a principal (an user or group) from the historical archive based on its ID.


Parameters:
  dbc - the current database context
Parameters:
  principalId - the id of the principal to read the historical principal entry with the given id
throws:
  CmsException - if something goes wrong, ie.

public  CmsHistoryProjectreadHistoryProject(CmsDbContext dbc, int publishTag)
    
public  ListreadHistoryPropertyObjects(CmsDbContext dbc, I_CmsHistoryResource historyResource)
    
public  voidreadLocks(CmsDbContext dbc)
    
public  CmsGroupreadManagerGroup(CmsDbContext dbc, CmsProject project)
    
public  CmsOrganizationalUnitreadOrganizationalUnit(CmsDbContext dbc, String ouFqn)
    
public  CmsUserreadOwner(CmsDbContext dbc, CmsProject project)
    
public  ListreadPath(CmsDbContext dbc, CmsUUID projectId, String path, CmsResourceFilter filter)
    
public  CmsProjectreadProject(CmsDbContext dbc, CmsUUID id)
    
public  CmsProjectreadProject(CmsDbContext dbc, String name)
     Reads a project.

Important: Since a project name can be used multiple times, this is NOT the most efficient way to read the project.

public  ListreadProjectResources(CmsDbContext dbc, CmsProject project)
    
public  ListreadProjectView(CmsDbContext dbc, CmsUUID projectId, CmsResourceState state)
    
public  CmsPropertyDefinitionreadPropertyDefinition(CmsDbContext dbc, String name)
    
public  CmsPropertyreadPropertyObject(CmsDbContext dbc, CmsResource resource, String key, boolean search)
     Reads a property object from a resource specified by a property name.

Returns CmsProperty.getNullProperty if the property is not found.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource where the property is read from
Parameters:
  key - the property key name
Parameters:
  search - if true, the property is searched on all parent folders of the resource.

public  ListreadPropertyObjects(CmsDbContext dbc, CmsResource resource, boolean search)
    
public  CmsPublishJobInfoBeanreadPublishJob(CmsDbContext dbc, CmsUUID publishHistoryId)
    
public  ListreadPublishJobs(CmsDbContext dbc, long startTime, long endTime)
    
public  CmsPublishListreadPublishList(CmsDbContext dbc, CmsUUID publishHistoryId)
    
public  byte[]readPublishReportContents(CmsDbContext dbc, CmsUUID publishHistoryId)
    
public  ListreadPublishedResources(CmsDbContext dbc, CmsUUID publishHistoryId)
    
public  I_CmsHistoryResourcereadResource(CmsDbContext dbc, CmsResource resource, int version)
    
public  CmsResourcereadResource(CmsDbContext dbc, CmsUUID structureID, CmsResourceFilter filter)
    
public  CmsResourcereadResource(CmsDbContext dbc, String resourcePath, CmsResourceFilter filter)
    
public  I_CmsHistoryResourcereadResourceForPublishTag(CmsDbContext dbc, CmsResource resource, int publishTag)
    
public  ListreadResources(CmsDbContext dbc, CmsResource parent, CmsResourceFilter filter, boolean readTree)
    
public  ListreadResourcesWithProperty(CmsDbContext dbc, CmsResource folder, String propertyDefinition, String value, CmsResourceFilter filter)
    
public  SetreadResponsiblePrincipals(CmsDbContext dbc, CmsResource resource)
    
public  SetreadResponsibleUsers(CmsDbContext dbc, CmsResource resource)
    
public  ListreadSiblings(CmsDbContext dbc, CmsResource resource, CmsResourceFilter filter)
    
public  StringreadStaticExportPublishedResourceParameters(CmsDbContext dbc, String rfsName)
    
public  ListreadStaticExportResources(CmsDbContext dbc, int parameterResources, long timestamp)
    
public  CmsUserreadUser(CmsDbContext dbc, CmsUUID id)
    
public  CmsUserreadUser(CmsDbContext dbc, String username)
    
public  CmsUserreadUser(CmsDbContext dbc, String username, String password)
    
public  voidremoveAccessControlEntry(CmsDbContext dbc, CmsResource resource, CmsUUID principal)
    
public  voidremoveResourceFromOrgUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsResource resource)
    
public  voidremoveResourceFromProject(CmsDbContext dbc, CmsResource resource)
    
public  voidremoveUserFromGroup(CmsDbContext dbc, String username, String groupname, boolean readRoles)
    
public  voidreplaceResource(CmsDbContext dbc, CmsResource resource, int type, byte[] content, List properties)
    
public  voidresetPassword(CmsDbContext dbc, String username, String oldPassword, String newPassword)
    
public  voidrestoreDeletedResource(CmsDbContext dbc, CmsUUID structureId)
    
public  voidrestoreResource(CmsDbContext dbc, CmsResource resource, int version)
    
public  voidsetDateExpired(CmsDbContext dbc, CmsResource resource, long dateExpired)
    
public  voidsetDateLastModified(CmsDbContext dbc, CmsResource resource, long dateLastModified)
    
public  voidsetDateReleased(CmsDbContext dbc, CmsResource resource, long dateReleased)
    
public  voidsetParentGroup(CmsDbContext dbc, String groupName, String parentGroupName)
    
public  voidsetPassword(CmsDbContext dbc, String username, String newPassword)
    
public  voidsetUsersOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsUser user)
    
public  voidundelete(CmsDbContext dbc, CmsResource resource)
    
public  voidundoChanges(CmsDbContext dbc, CmsResource resource, CmsResource.CmsResourceUndoMode mode)
    
public  voidunlockProject(CmsProject project)
    
public  voidunlockResource(CmsDbContext dbc, CmsResource resource, boolean force, boolean removeSystemLock)
    
public  voidupdateExportPoints(CmsDbContext dbc)
    
public  voidupdateRelationsForResource(CmsDbContext dbc, CmsResource resource, List links)
    
public  booleanuserInGroup(CmsDbContext dbc, String username, String groupname, boolean readRoles)
    
public  voidvalidatePassword(String password)
    
public  MapvalidateRelations(CmsDbContext dbc, CmsPublishList publishList, I_CmsReport report)
    
public  voidwriteAccessControlEntry(CmsDbContext dbc, CmsResource resource, CmsAccessControlEntry ace)
    
public  voidwriteExportPoints(CmsDbContext dbc, I_CmsReport report, CmsUUID publishHistoryId)
    
public  CmsFilewriteFile(CmsDbContext dbc, CmsFile resource)
     Writes a resource to the OpenCms VFS, including it's content.

Applies only to resources of type CmsFile i.e.

public  voidwriteGroup(CmsDbContext dbc, CmsGroup group)
    
public  voidwriteHistoryProject(CmsDbContext dbc, int publishTag, long publishDate)
    
public  voidwriteLocks(CmsDbContext dbc)
    
public  voidwriteOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit)
    
public  voidwriteProject(CmsDbContext dbc, CmsProject project)
    
public  voidwritePropertyObject(CmsDbContext dbc, CmsResource resource, CmsProperty property)
    
public  voidwritePropertyObjects(CmsDbContext dbc, CmsResource resource, List properties, boolean updateState)
    
public  voidwritePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob)
    
public  voidwritePublishReport(CmsDbContext dbc, CmsPublishJobInfoBean publishJob)
    
public  voidwriteResource(CmsDbContext dbc, CmsResource resource)
    
public  voidwriteStaticExportPublishedResource(CmsDbContext dbc, String resourceName, int linkType, String linkParameter, long timestamp)
    
public  voidwriteUser(CmsDbContext dbc, CmsUser user)
     Updates the user information.

Field Detail
CACHE_ALL_PROPERTIES
final public static String CACHE_ALL_PROPERTIES(Code)
Cache key for all properties.



CHANGED_ACCESSCONTROL
final public static int CHANGED_ACCESSCONTROL(Code)
Value to indicate a change in access control entries of a resource.



CHANGED_CONTENT
final public static int CHANGED_CONTENT(Code)
Value to indicate a content change.



CHANGED_LASTMODIFIED
final public static int CHANGED_LASTMODIFIED(Code)
Value to indicate a change in the lastmodified settings of a resource.



CHANGED_RESOURCE
final public static int CHANGED_RESOURCE(Code)
Value to indicate a change in the resource data.



CHANGED_TIMEFRAME
final public static int CHANGED_TIMEFRAME(Code)
Value to indicate a change in the availability timeframe.



CONFIGURATION_BACKUP
final public static String CONFIGURATION_BACKUP(Code)
"driver.backup" string in the configuration-file. CmsDriverManager.CONFIGURATION_HISTORY



CONFIGURATION_CACHE
final public static String CONFIGURATION_CACHE(Code)
"cache" string in the configuration-file.



CONFIGURATION_DB
final public static String CONFIGURATION_DB(Code)
"db" string in the configuration-file.



CONFIGURATION_HISTORY
final public static String CONFIGURATION_HISTORY(Code)
"driver.history" string in the configuration-file.



CONFIGURATION_PROJECT
final public static String CONFIGURATION_PROJECT(Code)
"driver.project" string in the configuration-file.



CONFIGURATION_USER
final public static String CONFIGURATION_USER(Code)
"driver.user" string in the configuration-file.



CONFIGURATION_VFS
final public static String CONFIGURATION_VFS(Code)
"driver.vfs" string in the configuration-file.



LOST_AND_FOUND_FOLDER
final public static String LOST_AND_FOUND_FOLDER(Code)
The vfs path of the loast and found folder.



MAX_VFS_RESOURCE_PATH_LENGTH
final public static int MAX_VFS_RESOURCE_PATH_LENGTH(Code)
The maximum length of a VFS resource path.



NOTHING_CHANGED
final public static int NOTHING_CHANGED(Code)
Key for indicating no changes.



READMODE_EXCLUDE_STATE
final public static int READMODE_EXCLUDE_STATE(Code)
Indicates to match resources NOT having the given state.



READMODE_EXCLUDE_TREE
final public static int READMODE_EXCLUDE_TREE(Code)
Indicates to match immediate children only.



READMODE_EXCLUDE_TYPE
final public static int READMODE_EXCLUDE_TYPE(Code)
Indicates to match resources NOT having the given type.



READMODE_IGNORESTATE
final public static int READMODE_IGNORESTATE(Code)
Mode for reading project resources from the db.



READMODE_INCLUDE_PROJECT
final public static int READMODE_INCLUDE_PROJECT(Code)
Indicates to match resources in given project only.



READMODE_INCLUDE_TREE
final public static int READMODE_INCLUDE_TREE(Code)
Indicates to match all successors.



READMODE_MATCHSTATE
final public static int READMODE_MATCHSTATE(Code)
Mode for reading project resources from the db.



READMODE_ONLY_FILES
final public static int READMODE_ONLY_FILES(Code)
Indicates if only file resources should be read.



READMODE_ONLY_FOLDERS
final public static int READMODE_ONLY_FOLDERS(Code)
Indicates if only folder resources should be read.



READMODE_UNMATCHSTATE
final public static int READMODE_UNMATCHSTATE(Code)
Mode for reading project resources from the db.



READ_IGNORE_PARENT
final public static String READ_IGNORE_PARENT(Code)
Indicates to ignore the resource path when matching resources.



READ_IGNORE_TIME
final public static long READ_IGNORE_TIME(Code)
Indicates to ignore the time value.



READ_IGNORE_TYPE
final public static int READ_IGNORE_TYPE(Code)
Indicates to ignore the resource type when matching resources.



TEMP_FILE_PREFIX
final public static String TEMP_FILE_PREFIX(Code)
Prefix char for temporary files in the VFS.



UPDATE_ALL
final public static int UPDATE_ALL(Code)
Key to indicate complete update.



UPDATE_RESOURCE
final public static int UPDATE_RESOURCE(Code)
Key to indicate update of resource record.



UPDATE_RESOURCE_PROJECT
final public static int UPDATE_RESOURCE_PROJECT(Code)
Key to indicate update of last modified project reference.



UPDATE_RESOURCE_STATE
final public static int UPDATE_RESOURCE_STATE(Code)
Key to indicate update of resource state.



UPDATE_RESOURCE_STATE_CONTENT
final public static int UPDATE_RESOURCE_STATE_CONTENT(Code)
Key to indicate update of resource state including the content date.



UPDATE_STRUCTURE
final public static int UPDATE_STRUCTURE(Code)
Key to indicate update of structure record.



UPDATE_STRUCTURE_STATE
final public static int UPDATE_STRUCTURE_STATE(Code)
Key to indicate update of structure state.





Method Detail
addRelationToResource
public void addRelationToResource(CmsDbContext dbc, CmsResource resource, CmsResource target, CmsRelationType type, boolean importCase) throws CmsException(Code)
Adds a new relation to the given resource.


Parameters:
  dbc - the database context
Parameters:
  resource - the resource to add the relation to
Parameters:
  target - the target of the relation
Parameters:
  type - the type of the relation
Parameters:
  importCase - if importing relations
throws:
  CmsException - if something goes wrong




addResourceToOrgUnit
public void addResourceToOrgUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsResource resource) throws CmsException(Code)
Adds a resource to the given organizational unit.


Parameters:
  dbc - the current db context
Parameters:
  orgUnit - the organizational unit to add the resource to
Parameters:
  resource - the resource that is to be added to the organizational unit
throws:
  CmsException - if something goes wrong
See Also:   org.opencms.security.CmsOrgUnitManager.addResourceToOrgUnit(CmsObjectStringString)
See Also:   org.opencms.security.CmsOrgUnitManager.addResourceToOrgUnit(CmsObjectStringString)




addUserToGroup
public void addUserToGroup(CmsDbContext dbc, String username, String groupname, boolean readRoles) throws CmsException, CmsDbEntryNotFoundException(Code)
Adds a user to a group.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user that is to be added to the group
Parameters:
  groupname - the name of the group
Parameters:
  readRoles - if reading roles or groups
throws:
  CmsException - if operation was not successful
throws:
  CmsDbEntryNotFoundException - if the given user or the given group was not found
See Also:   CmsDriverManager.removeUserFromGroup(CmsDbContext,String,String,boolean)




changeLock
public void changeLock(CmsDbContext dbc, CmsResource resource, CmsLockType lockType) throws CmsException, CmsSecurityException(Code)
Changes the lock of a resource to the current user, that is "steals" the lock from another user.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to change the lock for
Parameters:
  lockType - the new lock type to set
throws:
  CmsException - if something goes wrong
throws:
  CmsSecurityException - if something goes wrong
See Also:   CmsObject.changeLock(String)
See Also:   I_CmsResourceType.changeLock(CmsObjectCmsSecurityManagerCmsResource)
See Also:   CmsSecurityManager.hasPermissions(CmsRequestContextCmsResourceCmsPermissionSetbooleanCmsResourceFilter)




changeResourcesInFolderWithProperty
public List changeResourcesInFolderWithProperty(CmsDbContext dbc, CmsResource resource, String propertyDefinition, String oldValue, String newValue, boolean recursive) throws CmsVfsException, CmsException(Code)
Returns a list with all sub resources of a given folder that have set the given property, matching the current property's value with the given old value and replacing it by a given new value.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource on which property definition values are changed
Parameters:
  propertyDefinition - the name of the propertydefinition to change the value
Parameters:
  oldValue - the old value of the propertydefinition
Parameters:
  newValue - the new value of the propertydefinition
Parameters:
  recursive - if true, change recursively all property values on sub-resources (only for folders) a list with the CmsResource's where the property value has been changed
throws:
  CmsVfsException - for now only when the search for the oldvalue failed.
throws:
  CmsException - if operation was not successful




chflags
public void chflags(CmsDbContext dbc, CmsResource resource, int flags) throws CmsException(Code)
Changes the resource flags of a resource.

The resource flags are used to indicate various "special" conditions for a resource. Most notably, the "internal only" setting which signals that a resource can not be directly requested with it's URL.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to change the flags for
Parameters:
  flags - the new resource flags for this resource
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.chflags(Stringint)
See Also:   I_CmsResourceType.chflags(CmsObjectCmsSecurityManagerCmsResourceint)




chtype
public void chtype(CmsDbContext dbc, CmsResource resource, int type) throws CmsException(Code)
Changes the resource type of a resource.

OpenCms handles resources according to the resource type, not the file suffix. This is e.g. why a JSP in OpenCms can have the suffix ".html" instead of ".jsp" only. Changing the resource type makes sense e.g. if you want to make a plain text file a JSP resource, or a binary file an image, etc.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to change the type for
Parameters:
  type - the new resource type for this resource
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.chtype(Stringint)
See Also:   I_CmsResourceType.chtype(CmsObjectCmsSecurityManagerCmsResourceint)




cmsEvent
public void cmsEvent(CmsEvent event)(Code)

See Also:   org.opencms.main.I_CmsEventListener.cmsEvent(org.opencms.main.CmsEvent)



convertResourceToFolder
protected CmsFolder convertResourceToFolder(CmsResource resource) throws CmsVfsResourceNotFoundException(Code)
Converts a resource to a folder (if possible).


Parameters:
  resource - the resource to convert the converted resource
throws:
  CmsVfsResourceNotFoundException - if the resource is not a folder




copyAccessControlEntries
public void copyAccessControlEntries(CmsDbContext dbc, CmsResource source, CmsResource destination, boolean updateLastModifiedInfo) throws CmsException(Code)
Copies the access control entries of a given resource to a destination resorce.

Already existing access control entries of the destination resource are removed.


Parameters:
  dbc - the current database context
Parameters:
  source - the resource to copy the access control entries from
Parameters:
  destination - the resource to which the access control entries are copied
Parameters:
  updateLastModifiedInfo - if true, user and date "last modified" information on the target resource will be updated
throws:
  CmsException - if something goes wrong




copyResource
public void copyResource(CmsDbContext dbc, CmsResource source, String destination, CmsResource.CmsResourceCopyMode siblingMode) throws CmsException, CmsIllegalArgumentException(Code)
Copies a resource.

You must ensure that the destination path is an absolute, valid and existing VFS path. Relative paths from the source are currently not supported.

In case the target resource already exists, it is overwritten with the source resource.

The siblingMode parameter controls how to handle siblings during the copy operation. Possible values for this parameter are:


Parameters:
  dbc - the current database context
Parameters:
  source - the resource to copy
Parameters:
  destination - the name of the copy destination with complete path
Parameters:
  siblingMode - indicates how to handle siblings during copy
throws:
  CmsException - if something goes wrong
throws:
  CmsIllegalArgumentException - if the source argument is null
See Also:   CmsObject.copyResource(StringStringCmsResource.CmsResourceCopyMode)
See Also:   I_CmsResourceType.copyResource(CmsObjectCmsSecurityManagerCmsResourceStringCmsResource.CmsResourceCopyMode)




copyResourceToProject
public void copyResourceToProject(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Copies a resource to the current project of the user.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to apply this operation to
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.copyResourceToProject(String)
See Also:   I_CmsResourceType.copyResourceToProject(CmsObjectCmsSecurityManagerCmsResource)




countLockedResources
public int countLockedResources(CmsProject project)(Code)
Counts the locked resources in this project.


Parameters:
  project - the project to count the locked resources in the amount of locked resources in this project




createGroup
public CmsGroup createGroup(CmsDbContext dbc, CmsUUID id, String name, String description, int flags, String parent) throws CmsIllegalArgumentException, CmsException(Code)
Add a new group to the Cms.

Only the admin can do this. Only users, which are in the group "administrators" are granted.


Parameters:
  dbc - the current database context
Parameters:
  id - the id of the new group
Parameters:
  name - the name of the new group
Parameters:
  description - the description for the new group
Parameters:
  flags - the flags for the new group
Parameters:
  parent - the name of the parent group (or null) new created group
throws:
  CmsException - if the creation of the group failed
throws:
  CmsIllegalArgumentException - if the length of the given name was below 1




createOrganizationalUnit
public CmsOrganizationalUnit createOrganizationalUnit(CmsDbContext dbc, String ouFqn, String description, int flags, CmsResource resource) throws CmsException(Code)
Creates a new organizational unit.


Parameters:
  dbc - the current db context
Parameters:
  ouFqn - the fully qualified name of the new organizational unit
Parameters:
  description - the description of the new organizational unit
Parameters:
  flags - the flags for the new organizational unit
Parameters:
  resource - the first associated resource a CmsOrganizationalUnit object representing the newly created organizational unit
throws:
  CmsException - if operation was not successful
See Also:   org.opencms.security.CmsOrgUnitManager.createOrganizationalUnit(CmsObjectStringStringintString)




createProject
public CmsProject createProject(CmsDbContext dbc, String name, String description, String groupname, String managergroupname, CmsProject.CmsProjectType projecttype) throws CmsIllegalArgumentException, CmsException(Code)
Creates a project.


Parameters:
  dbc - the current database context
Parameters:
  name - the name of the project to create
Parameters:
  description - the description of the project
Parameters:
  groupname - the project user group to be set
Parameters:
  managergroupname - the project manager group to be set
Parameters:
  projecttype - the type of the project the created project
throws:
  CmsIllegalArgumentException - if the chosen name is already used by the online project, or if the name is not valid
throws:
  CmsException - if something goes wrong




createPropertyDefinition
public CmsPropertyDefinition createPropertyDefinition(CmsDbContext dbc, String name) throws CmsException(Code)
Creates a property definition.

Property definitions are valid for all resource types.


Parameters:
  dbc - the current database context
Parameters:
  name - the name of the property definition to create the created property definition
throws:
  CmsException - if something goes wrong




createPublishJob
public void createPublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException(Code)
Creates a new publish job.


Parameters:
  dbc - the current database context
Parameters:
  publishJob - the publish job to create
throws:
  CmsException - if something goes wrong




createResource
public synchronized CmsResource createResource(CmsDbContext dbc, String resourcePath, CmsResource resource, byte[] content, List properties, boolean importCase) throws CmsException(Code)
Creates a new resource with the provided content and properties.

The content parameter may be null if the resource id already exists. If so, the created resource will be a sibling of the existing resource, the existing content will remain unchanged.

This is used during file import for import of siblings as the manifest.xml only contains one binary copy per file.

If the resource id exists but the content is not null, the created resource will be made a sibling of the existing resource, and both will share the new content.


Parameters:
  dbc - the current database context
Parameters:
  resourcePath - the name of the resource to create (full path)
Parameters:
  resource - the new resource to create
Parameters:
  content - the content for the new resource
Parameters:
  properties - the properties for the new resource
Parameters:
  importCase - if true, signals that this operation is done while importing resource, causing different lock behavior and potential "lost and found" usage the created resource
throws:
  CmsException - if something goes wrong




createResource
public CmsResource createResource(CmsDbContext dbc, String resourcename, int type, byte[] content, List properties) throws CmsException, CmsIllegalArgumentException(Code)
Creates a new resource of the given resource type with the provided content and properties.

If the provided content is null and the resource is not a folder, the content will be set to an empty byte array.


Parameters:
  dbc - the current database context
Parameters:
  resourcename - the name of the resource to create (full path)
Parameters:
  type - the type of the resource to create
Parameters:
  content - the content for the new resource
Parameters:
  properties - the properties for the new resource the created resource
throws:
  CmsException - if something goes wrong
throws:
  CmsIllegalArgumentException - if the resourcename argument is null or of length 0
See Also:   CmsObject.createResource(Stringintbyte[]List)
See Also:   CmsObject.createResource(Stringint)
See Also:   I_CmsResourceType.createResource(CmsObjectCmsSecurityManagerStringbyte[]List)




createSibling
public CmsResource createSibling(CmsDbContext dbc, CmsResource source, String destination, List properties) throws CmsException(Code)
Creates a new sibling of the source resource.


Parameters:
  dbc - the current database context
Parameters:
  source - the resource to create a sibling for
Parameters:
  destination - the name of the sibling to create with complete path
Parameters:
  properties - the individual properties for the new sibling the new created sibling
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.createSibling(StringStringList)
See Also:   I_CmsResourceType.createSibling(CmsObjectCmsSecurityManagerCmsResourceStringList)




createTempfileProject
public CmsProject createTempfileProject(CmsDbContext dbc) throws CmsException(Code)
Creates the project for the temporary workplace files.


Parameters:
  dbc - the current database context the created project for the temporary workplace files
throws:
  CmsException - if something goes wrong




createUser
public CmsUser createUser(CmsDbContext dbc, String name, String password, String description, Map additionalInfos) throws CmsException, CmsIllegalArgumentException(Code)
Creates a new user.


Parameters:
  dbc - the current database context
Parameters:
  name - the name for the new user
Parameters:
  password - the password for the new user
Parameters:
  description - the description for the new user
Parameters:
  additionalInfos - the additional infos for the user the created user
See Also:   CmsObject.createUser(StringStringStringMap)
throws:
  CmsException - if something goes wrong
throws:
  CmsIllegalArgumentException - if the name for the user is not valid




deleteAllProperties
public void deleteAllProperties(CmsDbContext dbc, String resourcename) throws CmsException(Code)
Deletes all property values of a file or folder.

If there are no other siblings than the specified resource, both the structure and resource property values get deleted. If the specified resource has siblings, only the structure property values get deleted.


Parameters:
  dbc - the current database context
Parameters:
  resourcename - the name of the resource for which all properties should be deleted
throws:
  CmsException - if operation was not successful




deleteAllStaticExportPublishedResources
public void deleteAllStaticExportPublishedResources(CmsDbContext dbc, int linkType) throws CmsException(Code)
Deletes all entries in the published resource table.


Parameters:
  dbc - the current database context
Parameters:
  linkType - the type of resource deleted (0= non-paramter, 1=parameter)
throws:
  CmsException - if something goes wrong




deleteGroup
public void deleteGroup(CmsDbContext dbc, CmsGroup group, CmsUUID replacementId) throws CmsDataAccessException, CmsException(Code)
Deletes a group, where all permissions, users and children of the group are transfered to a replacement group.


Parameters:
  dbc - the current request context
Parameters:
  group - the id of the group to be deleted
Parameters:
  replacementId - the id of the group to be transfered, can be null
throws:
  CmsException - if operation was not successful
throws:
  CmsDataAccessException - if group to be deleted contains user




deleteHistoricalVersions
public void deleteHistoricalVersions(CmsDbContext dbc, CmsFolder folder, int versionsToKeep, int versionsDeleted, long timeDeleted, I_CmsReport report) throws CmsException(Code)
Deletes the versions from the history tables, keeping the given number of versions per resource.

if the cleanUp option is set, additionally versions of deleted resources will be removed.


Parameters:
  dbc - the current database context
Parameters:
  folder - the folder (with subresources) to delete historical versions for
Parameters:
  versionsToKeep - number of versions to keep, is ignored if negative
Parameters:
  versionsDeleted - number of versions to keep for deleted resources, is ignored if negative
Parameters:
  timeDeleted - deleted resources older than this will also be deleted, is ignored if negative
Parameters:
  report - the report for output logging
throws:
  CmsException - if operation was not successful




deleteOrganizationalUnit
public void deleteOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit) throws CmsException(Code)
Deletes an organizational unit.

Only organizational units that contain no suborganizational unit can be deleted.

The organizational unit can not be delete if it is used in the request context, or if the current user belongs to it.

All users and groups in the given organizational unit will be deleted.


Parameters:
  dbc - the current db context
Parameters:
  organizationalUnit - the organizational unit to delete
throws:
  CmsException - if operation was not successful
See Also:   org.opencms.security.CmsOrgUnitManager.deleteOrganizationalUnit(CmsObjectString)




deleteProject
public void deleteProject(CmsDbContext dbc, CmsProject deleteProject) throws CmsException(Code)
Deletes a project.

Only the admin or the owner of the project can do this.
Parameters:
  dbc - the current database context
Parameters:
  deleteProject - the project to be deleted
throws:
  CmsException - if something goes wrong




deletePropertyDefinition
public void deletePropertyDefinition(CmsDbContext dbc, String name) throws CmsException(Code)
Deletes a property definition.


Parameters:
  dbc - the current database context
Parameters:
  name - the name of the property definition to delete
throws:
  CmsException - if something goes wrong




deletePublishJob
public void deletePublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException(Code)
Deletes a publish job identified by its history id.


Parameters:
  dbc - the current database context
Parameters:
  publishHistoryId - the history id identifying the publish job
throws:
  CmsException - if something goes wrong




deletePublishList
public void deletePublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException(Code)
Deletes the publish list assigned to a publish job.


Parameters:
  dbc - the current database context
Parameters:
  publishHistoryId - the history id identifying the publish job
throws:
  CmsException - if something goes wrong




deleteRelationsForResource
public void deleteRelationsForResource(CmsDbContext dbc, CmsResource resource, CmsRelationFilter filter) throws CmsException(Code)
Deletes all relations for the given resource matching the given filter.


Parameters:
  dbc - the current db context
Parameters:
  resource - the resource to delete the relations for
Parameters:
  filter - the filter to use for deletion
throws:
  CmsException - if something goes wrong
See Also:   CmsSecurityManager.deleteRelationsForResource(CmsRequestContextCmsResourceCmsRelationFilter)




deleteRelationsWithSiblings
protected void deleteRelationsWithSiblings(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Deletes all relations for the given resource and all its siblings.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to delete the resource for
throws:
  CmsException - if something goes wrong




deleteResource
public void deleteResource(CmsDbContext dbc, CmsResource resource, CmsResource.CmsResourceDeleteMode siblingMode) throws CmsException(Code)
Deletes a resource.

The siblingMode parameter controls how to handle siblings during the delete operation. Possible values for this parameter are:


Parameters:
  dbc - the current database context
Parameters:
  resource - the name of the resource to delete (full path)
Parameters:
  siblingMode - indicates how to handle siblings of the deleted resource
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.deleteResource(StringCmsResource.CmsResourceDeleteMode)
See Also:   I_CmsResourceType.deleteResource(CmsObjectCmsSecurityManagerCmsResourceCmsResource.CmsResourceDeleteMode)




deleteStaticExportPublishedResource
public void deleteStaticExportPublishedResource(CmsDbContext dbc, String resourceName, int linkType, String linkParameter) throws CmsException(Code)
Deletes an entry in the published resource table.


Parameters:
  dbc - the current database context
Parameters:
  resourceName - The name of the resource to be deleted in the static export
Parameters:
  linkType - the type of resource deleted (0= non-parameter, 1=parameter)
Parameters:
  linkParameter - the parameters of the resource
throws:
  CmsException - if something goes wrong




deleteUser
public void deleteUser(CmsDbContext dbc, CmsProject project, String username, String replacementUsername) throws CmsException(Code)
Deletes a user, where all permissions and resources attributes of the user were transfered to a replacement user, if given.

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


Parameters:
  dbc - the current database context
Parameters:
  project - the current project
Parameters:
  username - the name of the user to be deleted
Parameters:
  replacementUsername - the name of the user to be transfered, can be null
throws:
  CmsException - if operation was not successful




destroy
public void destroy()(Code)
Destroys this driver manager and releases all allocated resources.




existsResourceId
public boolean existsResourceId(CmsDbContext dbc, CmsUUID resourceId) throws CmsException(Code)
Tests if a resource with the given resourceId does already exist in the Database.


Parameters:
  dbc - the current database context
Parameters:
  resourceId - the resource id to test for true if a resource with the given id was found, false otherweise
throws:
  CmsException - if something goes wrong




fillPublishList
public void fillPublishList(CmsDbContext dbc, CmsPublishList publishList) throws CmsException(Code)
Fills the given publish list with the the VFS resources that actually get published.

Please refer to the source code of this method for the rules on how to decide whether a new/changed/deleted CmsResource object can be published or not.


Parameters:
  dbc - the current database context
Parameters:
  publishList - must be initialized with basic publish information (Project or direct publish operation),the given publish list will be filled with all new/changed/deleted files from the current (offline) project that will be actually published
throws:
  CmsException - if something goes wrong
See Also:   org.opencms.db.CmsPublishList




getAccessControlEntries
public List getAccessControlEntries(CmsDbContext dbc, CmsResource resource, boolean getInherited) throws CmsException(Code)
Returns the list of access control entries of a resource given its name.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to read the access control entries for
Parameters:
  getInherited - true if the result should include all access control entries inherited by parent folders a list of CmsAccessControlEntry objects defining all permissions for the given resource
throws:
  CmsException - if something goes wrong




getAccessControlList
public CmsAccessControlList getAccessControlList(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Returns the full access control list of a given resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource the access control list of the resource
throws:
  CmsException - if something goes wrong




getAccessControlList
public CmsAccessControlList getAccessControlList(CmsDbContext dbc, CmsResource resource, boolean inheritedOnly) throws CmsException(Code)
Returns the access control list of a given resource.

If inheritedOnly is set, only inherited access control entries are returned.

Note: For file resources, *all* permissions set at the immediate parent folder are inherited, not only these marked to inherit.
Parameters:
  dbc - the current database context
Parameters:
  resource - the resource
Parameters:
  inheritedOnly - skip non-inherited entries if set the access control list of the resource
throws:
  CmsException - if something goes wrong




getActiveConnections
public int getActiveConnections(String dbPoolUrl) throws CmsDbException(Code)
Returns the number of active connections managed by a pool.


Parameters:
  dbPoolUrl - the url of a pool the number of active connections
throws:
  CmsDbException - if something goes wrong




getAllAccessibleProjects
public List getAllAccessibleProjects(CmsDbContext dbc) throws CmsException(Code)
Returns all projects which are owned by the current user or which are accessible by the current user.


Parameters:
  dbc - the current database context a list of objects of type CmsProject
throws:
  CmsException - if something goes wrong




getAllHistoricalProjects
public List getAllHistoricalProjects(CmsDbContext dbc) throws CmsException(Code)
Returns a list with all projects from history.


Parameters:
  dbc - the current database context list of CmsHistoryProject objects with all projects from history.
throws:
  CmsException - if operation was not successful




getAllManageableProjects
public List getAllManageableProjects(CmsDbContext dbc) throws CmsException(Code)
Returns all projects which are owned by the current user or which are manageable for the group of the user.


Parameters:
  dbc - the current database context a list of objects of type CmsProject
throws:
  CmsException - if operation was not successful




getChildren
public List getChildren(CmsDbContext dbc, CmsGroup group, boolean includeSubChildren) throws CmsException(Code)
Returns all child groups of a group.


Parameters:
  dbc - the current database context
Parameters:
  group - the group to get the child for
Parameters:
  includeSubChildren - if set also returns all sub-child groups of the given group a list of all child CmsGroup objects
throws:
  CmsException - if operation was not successful




getGroups
public List getGroups(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, boolean includeSubOus, boolean readRoles) throws CmsException(Code)
Returns all groups of the given organizational unit.


Parameters:
  dbc - the current db context
Parameters:
  orgUnit - the organizational unit to get the groups for
Parameters:
  includeSubOus - if all groups of sub-organizational units should be retrieved too
Parameters:
  readRoles - if to read roles or groups all CmsGroup objects in the organizational unit
throws:
  CmsException - if operation was not successful
See Also:   org.opencms.security.CmsOrgUnitManager.getResourcesForOrganizationalUnit(CmsObjectString)
See Also:   org.opencms.security.CmsOrgUnitManager.getGroups(CmsObjectStringboolean)




getGroupsOfUser
public List getGroupsOfUser(CmsDbContext dbc, String username, boolean readRoles) throws CmsException(Code)
Returns the groups of an user filtered by the specified IP address.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user
Parameters:
  readRoles - if to read roles or groups the groups of the given user, as a list of CmsGroup objects
throws:
  CmsException - if something goes wrong




getGroupsOfUser
public List getGroupsOfUser(CmsDbContext dbc, String username, String ouFqn, boolean includeChildOus, boolean readRoles, boolean directGroupsOnly, String remoteAddress) throws CmsException(Code)
Returns the groups of an user filtered by the specified IP address.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user
Parameters:
  ouFqn - the fully qualified name of the organizational unit to restrict the result set for
Parameters:
  includeChildOus - include groups of child organizational units
Parameters:
  readRoles - if to read roles or groups
Parameters:
  directGroupsOnly - if set only the direct assigned groups will be returned, if not also indirect groups
Parameters:
  remoteAddress - the IP address to filter the groups in the result list a list of CmsGroup objects
throws:
  CmsException - if operation was not successful




getHistoryDriver
public I_CmsHistoryDriver getHistoryDriver()(Code)
Returns the history driver.

the history driver




getIdleConnections
public int getIdleConnections(String dbPoolUrl) throws CmsDbException(Code)
Returns the number of idle connections managed by a pool.


Parameters:
  dbPoolUrl - the url of a pool the number of idle connections
throws:
  CmsDbException - if something goes wrong




getLock
public CmsLock getLock(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Returns the lock state of a resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to return the lock state for the lock state of the resource
throws:
  CmsException - if something goes wrong




getLockManager
protected CmsLockManager getLockManager()(Code)
Returns the lock manager instance.

the lock manager instance




getLockedResources
public List getLockedResources(CmsDbContext dbc, CmsResource resource, CmsLockFilter filter) throws CmsException(Code)
Returns all locked resources in a given folder.


Parameters:
  dbc - the current database context
Parameters:
  resource - the folder to search in
Parameters:
  filter - the lock filter a list of locked resource paths (relative to current site)
throws:
  CmsException - if the current project is locked




getNextPublishTag
public int getNextPublishTag(CmsDbContext dbc)(Code)
Returns the next publish tag for the published historical resources.


Parameters:
  dbc - the current database context the next available publish tag




getOrgUnitsForRole
public List getOrgUnitsForRole(CmsDbContext dbc, CmsRole role, boolean includeSubOus) throws CmsException(Code)
Returns all the organizational units for which the current user has the given role.


Parameters:
  dbc - the current database context
Parameters:
  role - the role to check
Parameters:
  includeSubOus - if sub organizational units should be included in the search a list of org.opencms.security.CmsOrganizationalUnit objects
throws:
  CmsException - if something goes wrong




getOrganizationalUnits
public List getOrganizationalUnits(CmsDbContext dbc, CmsOrganizationalUnit parent, boolean includeChildren) throws CmsException(Code)
Returns all child organizational units of the given parent organizational unit including hierarchical deeper organization units if needed.


Parameters:
  dbc - the current db context
Parameters:
  parent - the parent organizational unit, or null for the root
Parameters:
  includeChildren - if hierarchical deeper organization units should also be returned a list of CmsOrganizationalUnit objects
throws:
  CmsException - if operation was not successful
See Also:   org.opencms.security.CmsOrgUnitManager.getOrganizationalUnits(CmsObjectStringboolean)




getParent
public CmsGroup getParent(CmsDbContext dbc, String groupname) throws CmsException(Code)
Returns the parent group of a group.


Parameters:
  dbc - the current database context
Parameters:
  groupname - the name of the group group the parent group or null
throws:
  CmsException - if operation was not successful




getPermissions
public CmsPermissionSetCustom getPermissions(CmsDbContext dbc, CmsResource resource, CmsUser user) throws CmsException(Code)
Returns the set of permissions of the current user for a given resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource
Parameters:
  user - the user bit set with allowed permissions
throws:
  CmsException - if something goes wrong




getProjectDriver
public I_CmsProjectDriver getProjectDriver()(Code)
Returns the project driver.

the project driver




getProjectId
public CmsUUID getProjectId(CmsDbContext dbc, int id) throws CmsException(Code)
Returns the uuid id for the given id.

TODO: remove this method as soon as possible
Parameters:
  dbc - the current database context
Parameters:
  id - the old project id the new uuid for the given id
throws:
  CmsException - if something goes wrong




getPropertyConfiguration
public ExtendedProperties getPropertyConfiguration()(Code)
Returns the configuration read from the opencms.properties file.

the configuration read from the opencms.properties file




getRelatedResourcesToPublish
public CmsPublishList getRelatedResourcesToPublish(CmsDbContext dbc, CmsPublishList publishList, CmsRelationFilter filter) throws CmsException(Code)
Returns a new publish list that contains the unpublished resources related to all resources in the given publish list, the related resources exclude all resources in the given publish list and also locked (by other users) resources.


Parameters:
  dbc - the current database context
Parameters:
  publishList - the publish list to exclude from result
Parameters:
  filter - the relation filter to use to get the related resources a new publish list that contains the related resources
throws:
  CmsException - if something goes wrong
See Also:   org.opencms.publish.CmsPublishManager.getRelatedResourcesToPublish(CmsObjectCmsPublishList)




getRelationsForResource
public List getRelationsForResource(CmsDbContext dbc, CmsResource resource, CmsRelationFilter filter) throws CmsException(Code)
Returns all relations for the given resource matching the given filter.


Parameters:
  dbc - the current db context
Parameters:
  resource - the resource to retrieve the relations for
Parameters:
  filter - the filter to match the relation all CmsRelation objects for the given resource matching the given filter
throws:
  CmsException - if something goes wrong
See Also:   CmsSecurityManager.getRelationsForResource(CmsRequestContextCmsResourceCmsRelationFilter)




getResourcesForOrganizationalUnit
public List getResourcesForOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit) throws CmsException(Code)
Returns all resources of the given organizational unit.


Parameters:
  dbc - the current db context
Parameters:
  orgUnit - the organizational unit to get all resources for all CmsResource objects in the organizational unit
throws:
  CmsException - if operation was not successful
See Also:   org.opencms.security.CmsOrgUnitManager.getResourcesForOrganizationalUnit(CmsObjectString)
See Also:   org.opencms.security.CmsOrgUnitManager.getUsers(CmsObjectStringboolean)
See Also:   org.opencms.security.CmsOrgUnitManager.getGroups(CmsObjectStringboolean)




getResourcesForPrincipal
public List getResourcesForPrincipal(CmsDbContext dbc, CmsProject project, CmsUUID principalId, CmsPermissionSet permissions, boolean includeAttr) throws CmsException(Code)
Returns all resources associated to a given principal via an ACE with the given permissions.

If the includeAttr flag is set it returns also all resources associated to a given principal through some of following attributes.

  • User Created
  • User Last Modified


Parameters:
  dbc - the current database context
Parameters:
  project - the to read the entries from
Parameters:
  principalId - the id of the principal
Parameters:
  permissions - a set of permissions to match, can be null for all ACEs
Parameters:
  includeAttr - a flag to include resources associated by attributes a list of CmsResource objects
throws:
  CmsException - if something goes wrong




getRolesForResource
public List getRolesForResource(CmsDbContext dbc, CmsUser user, CmsResource resource) throws CmsException(Code)
Returns all roles the given user has for the given resource.


Parameters:
  dbc - the current database context
Parameters:
  user - the user to check
Parameters:
  resource - the resource to check the roles for a list of CmsRole objects
throws:
  CmsException - if something goes wrong




getRolesForUser
public List getRolesForUser(CmsDbContext dbc, CmsUser user) throws CmsException(Code)
Returns all roles the given user has independent of the resource.


Parameters:
  dbc - the current database context
Parameters:
  user - the user to check a list of CmsRole objects
throws:
  CmsException - if something goes wrong




getSecurityManager
public CmsSecurityManager getSecurityManager()(Code)
Returns the security manager this driver manager belongs to.

the security manager this driver manager belongs to




getSqlManager
public CmsSqlManager getSqlManager()(Code)
Returns an instance of the common sql manager.

an instance of the common sql manager




getUserDriver
public I_CmsUserDriver getUserDriver()(Code)
Returns the user driver.

the user driver




getUsers
public List getUsers(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, boolean recursive) throws CmsException(Code)
Returns all direct users of the given organizational unit.


Parameters:
  dbc - the current db context
Parameters:
  orgUnit - the organizational unit to get all users for
Parameters:
  recursive - if all groups of sub-organizational units should be retrieved too all CmsUser objects in the organizational unit
throws:
  CmsException - if operation was not successful
See Also:   org.opencms.security.CmsOrgUnitManager.getResourcesForOrganizationalUnit(CmsObjectString)
See Also:   org.opencms.security.CmsOrgUnitManager.getUsers(CmsObjectStringboolean)




getUsersOfGroup
public List getUsersOfGroup(CmsDbContext dbc, String groupname, boolean includeOtherOuUsers, boolean directUsersOnly, boolean readRoles) throws CmsException(Code)
Returns a list of users in a group.


Parameters:
  dbc - the current database context
Parameters:
  groupname - the name of the group to list users from
Parameters:
  includeOtherOuUsers - include users of other organizational units
Parameters:
  directUsersOnly - if set only the direct assigned users will be returned, if not also indirect users, ie. members of parent roles, this parameter only works with roles
Parameters:
  readRoles - if to read roles or groups all CmsUser objects in the group
throws:
  CmsException - if operation was not successful




getVfsDriver
public I_CmsVfsDriver getVfsDriver()(Code)
Returns the VFS driver.

the VFS driver




importAccessControlEntries
public void importAccessControlEntries(CmsDbContext dbc, CmsResource resource, List acEntries) throws CmsException(Code)
Writes a vector of access control entries as new access control entries of a given resource.

Already existing access control entries of this resource are removed before. Access is granted, if:

  • the current user has control permission on the resource

Parameters:
  dbc - the current database context
Parameters:
  resource - the resource
Parameters:
  acEntries - a list of CmsAccessControlEntry objects
throws:
  CmsException - if something goes wrong



importUser
public CmsUser importUser(CmsDbContext dbc, String id, String name, String password, String firstname, String lastname, String email, int flags, long dateCreated, Map additionalInfos) throws CmsException(Code)
Creates a new user by import.


Parameters:
  dbc - the current database context
Parameters:
  id - the id of the user
Parameters:
  name - the new name for the user
Parameters:
  password - the new password for the user
Parameters:
  firstname - the firstname of the user
Parameters:
  lastname - the lastname of the user
Parameters:
  email - the email of the user
Parameters:
  flags - the flags for a user (for example I_CmsPrincipal.FLAG_ENABLED)
Parameters:
  dateCreated - the creation date
Parameters:
  additionalInfos - the additional user infos the imported user
throws:
  CmsException - if something goes wrong




init
public void init(CmsConfigurationManager configurationManager) throws CmsException, Exception(Code)
Initializes the driver and sets up all required modules and connections.


Parameters:
  configurationManager - the configuration manager
throws:
  CmsException - if something goes wrong
throws:
  Exception - if something goes wrong




isInsideCurrentProject
public boolean isInsideCurrentProject(CmsDbContext dbc, String resourcename)(Code)
Checks if the specified resource is inside the current project.

The project "view" is determined by a set of path prefixes. If the resource starts with any one of this prefixes, it is considered to be "inside" the project.


Parameters:
  dbc - the current database context
Parameters:
  resourcename - the specified resource name (full path) true, if the specified resource is inside the current project




isTempfileProject
public boolean isTempfileProject(CmsProject project)(Code)
Checks if a project is the tempfile project.


Parameters:
  project - the project to test true if the project is the tempfile project




labelResource
public boolean labelResource(CmsDbContext dbc, CmsResource resource, String newResource, int action) throws CmsDataAccessException(Code)
Checks if one of the resources (except the resource itself) is a sibling in a "labeled" site folder.

This method is used when creating a new sibling (use the newResource parameter & action = 1) or deleting/importing a resource (call with action = 2).


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource
Parameters:
  newResource - absolute path for a resource sibling which will be created
Parameters:
  action - the action which has to be performed (1 = create VFS link, 2 all other actions) true if the flag should be set for the resource, otherwise false
throws:
  CmsDataAccessException - if something goes wrong




lockResource
public void lockResource(CmsDbContext dbc, CmsResource resource, CmsLockType type) throws CmsException(Code)
Locks a resource.

The type parameter controls what kind of lock is used.
Possible values for this parameter are:


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to lock
Parameters:
  type - type of the lock
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.lockResource(String)
See Also:   CmsObject.lockResourceTemporary(String)
See Also:   org.opencms.file.types.I_CmsResourceType.lockResource(CmsObjectCmsSecurityManagerCmsResourceCmsLockType)




lockedBy
public CmsUser lockedBy(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
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. This methods checks, if a resource was locked.
Parameters:
  dbc - the current database context
Parameters:
  resource - the resource the user, who had locked the resource
throws:
  CmsException - will be thrown, if the user has not the rights for this resource




loginUser
public CmsUser loginUser(CmsDbContext dbc, String userName, String password, String remoteAddress) throws CmsAuthentificationException, CmsDataAccessException, CmsPasswordEncryptionException(Code)
Attempts to authenticate a user into OpenCms with the given password.


Parameters:
  dbc - the current database context
Parameters:
  userName - the name of the user to be logged in
Parameters:
  password - the password of the user
Parameters:
  remoteAddress - the ip address of the request the logged in user
throws:
  CmsAuthentificationException - if the login was not successful
throws:
  CmsDataAccessException - in case of errors accessing the database
throws:
  CmsPasswordEncryptionException - in case of errors encrypting the users password




lookupPrincipal
public I_CmsPrincipal lookupPrincipal(CmsDbContext dbc, CmsUUID principalId)(Code)
Lookup and read the user or group with the given UUID.


Parameters:
  dbc - the current database context
Parameters:
  principalId - the UUID of the principal to lookup the principal (group or user) if found, otherwise null




lookupPrincipal
public I_CmsPrincipal lookupPrincipal(CmsDbContext dbc, String principalName)(Code)
Lookup and read the user or group with the given name.


Parameters:
  dbc - the current database context
Parameters:
  principalName - the name of the principal to lookup the principal (group or user) if found, otherwise null




moveResource
public void moveResource(CmsDbContext dbc, CmsResource source, String destination, boolean internal) throws CmsException(Code)
Moves a resource.

You must ensure that the parent of the destination path is an absolute, valid and existing VFS path. Relative paths from the source are not supported.

The moved resource will always be locked to the current user after the move operation.

In case the target resource already exists, it will be overwritten with the source resource if possible.


Parameters:
  dbc - the current database context
Parameters:
  source - the resource to move
Parameters:
  destination - the name of the move destination with complete path
Parameters:
  internal - if set nothing more than the path is modified
throws:
  CmsException - if something goes wrong
See Also:   CmsSecurityManager.moveResource(CmsRequestContextCmsResourceString)




moveToLostAndFound
public String moveToLostAndFound(CmsDbContext dbc, CmsResource resource, boolean returnNameOnly) throws CmsException, CmsIllegalArgumentException(Code)
Moves a resource to the "lost and found" folder.

The method can also be used to check get the name of a resource in the "lost and found" folder only without actually moving the the resource. To do this, the returnNameOnly flag must be set to true.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to apply this operation to
Parameters:
  returnNameOnly - if true, only the name of the resource in the "lost and found" folder is returned, the move operation is not really performed the name of the resource inside the "lost and found" folder
throws:
  CmsException - if something goes wrong
throws:
  CmsIllegalArgumentException - if the resourcename argument is null or of length 0
See Also:   CmsObject.moveToLostAndFound(String)
See Also:   CmsObject.getLostAndFoundName(String)




newDriverInstance
public Object newDriverInstance(CmsConfigurationManager configurationManager, String driverName, List successiveDrivers) throws CmsInitException(Code)
Gets a new driver instance.


Parameters:
  configurationManager - the configuration manager
Parameters:
  driverName - the driver name
Parameters:
  successiveDrivers - the list of successive drivers the driver object
throws:
  CmsInitException - if the selected driver could not be initialized




newDriverInstance
public Object newDriverInstance(ExtendedProperties configuration, String driverName, String driverPoolUrl) throws CmsException(Code)
Method to create a new instance of a driver.


Parameters:
  configuration - the configurations from the propertyfile
Parameters:
  driverName - the class name of the driver
Parameters:
  driverPoolUrl - the pool url for the driver an initialized instance of the driver
throws:
  CmsException - if something goes wrong




newInstance
public static CmsDriverManager newInstance(CmsConfigurationManager configurationManager, CmsSecurityManager securityManager, I_CmsDbContextFactory runtimeInfoFactory, CmsPublishEngine publishEngine) throws CmsInitException(Code)
Reads the required configurations from the opencms.properties file and creates the various drivers to access the cms resources.

The initialization process of the driver manager and its drivers is split into the following phases:

  • the database pool configuration is read
  • a plain and empty driver manager instance is created
  • an instance of each driver is created
  • the driver manager is passed to each driver during initialization
  • finally, the driver instances are passed to the driver manager during initialization

Parameters:
  configurationManager - the configuration manager
Parameters:
  securityManager - the security manager
Parameters:
  runtimeInfoFactory - the initialized OpenCms runtime info factory
Parameters:
  publishEngine - the publish engine CmsDriverManager the instantiated driver manager
throws:
  CmsInitException - if the driver manager couldn't be instantiated



newPoolInstance
public void newPoolInstance(Map configuration, String poolName) throws CmsInitException(Code)
Method to create a new instance of a pool.


Parameters:
  configuration - the configurations from the propertyfile
Parameters:
  poolName - the configuration name of the pool
throws:
  CmsInitException - if the pools could not be initialized




publishJob
public void publishJob(CmsObject cms, CmsDbContext dbc, CmsPublishList publishList, I_CmsReport report) throws CmsException(Code)
Publishes the given publish job.


Parameters:
  cms - the cms context
Parameters:
  dbc - the db context
Parameters:
  publishList - the list of resources to publish
Parameters:
  report - the report to write to
throws:
  CmsException - if something goes wrong




publishProject
public synchronized void publishProject(CmsObject cms, CmsDbContext dbc, CmsPublishList publishList, I_CmsReport report) throws CmsException(Code)
Publishes the resources of a specified publish list.


Parameters:
  cms - the current request context
Parameters:
  dbc - the current database context
Parameters:
  publishList - a publish list
Parameters:
  report - an instance of I_CmsReport to print messages
throws:
  CmsException - if something goes wrong
See Also:   CmsDriverManager.fillPublishList(CmsDbContext,CmsPublishList)




readAccessControlEntry
public CmsAccessControlEntry readAccessControlEntry(CmsDbContext dbc, CmsResource resource, CmsUUID principal) throws CmsException(Code)
Reads an access control entry from the cms.

The access control entries of a resource are readable by everyone.
Parameters:
  dbc - the current database context
Parameters:
  resource - the resource
Parameters:
  principal - the id of a group or a user any other entity an access control entry that defines the permissions of the entity for the given resource
throws:
  CmsException - if something goes wrong




readAllAvailableVersions
public List readAllAvailableVersions(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Reads all versions of the given resource.
This method returns a list with the history of the given resource, i.e. the historical resource entries, independent of the project they were attached to.
The reading excludes the file content.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to read the history for a list of file headers, as I_CmsHistoryResource objects
throws:
  CmsException - if something goes wrong




readAllPropertyDefinitions
public List readAllPropertyDefinitions(CmsDbContext dbc) throws CmsException(Code)
Reads all property definitions for the given mapping type.


Parameters:
  dbc - the current database context a list with the CmsPropertyDefinition objects (may be empty)
throws:
  CmsException - if something goes wrong




readChildResources
public List readChildResources(CmsDbContext dbc, CmsResource resource, CmsResourceFilter filter, boolean getFolders, boolean getFiles, boolean checkPermissions) throws CmsException(Code)
Returns the child resources of a resource, that is the resources contained in a folder.

With the parameters getFolders and getFiles you can control what type of resources you want in the result list: files, folders, or both.

This method is mainly used by the workplace explorer.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to return the child resources for
Parameters:
  filter - the resource filter to use
Parameters:
  getFolders - if true the child folders are included in the result
Parameters:
  getFiles - if true the child files are included in the result
Parameters:
  checkPermissions - if the resources should be filtered with the current user permissions a list of all child resources
throws:
  CmsException - if something goes wrong




readDefaultFile
public CmsResource readDefaultFile(CmsDbContext dbc, CmsResource resource)(Code)
Returns the default file for the given folder.

If the given resource is a file, then this file is returned.

Otherwise, in case of a folder:

  1. the CmsPropertyDefinition.PROPERTY_DEFAULT_FILE is checked, and
  2. if still no file could be found, the configured default files in the opencms-vfs.xml configuration are iterated until a match is found, and
  3. if still no file could be found, null is retuned

Parameters:
  dbc - the database context
Parameters:
  resource - the folder to get the default file for the default file for the given folder
See Also:   CmsObject.readDefaultFile(String)
See Also:   CmsDriverManager.readDefaultFile(CmsDbContextCmsResource)



readDeletedResources
public List readDeletedResources(CmsDbContext dbc, CmsResource resource, boolean readTree, boolean isVfsManager) throws CmsException(Code)
Reads all deleted (historical) resources below the given path, including the full tree below the path, if required.


Parameters:
  dbc - the current db context
Parameters:
  resource - the parent resource to read the resources from
Parameters:
  readTree - true to read all subresources
Parameters:
  isVfsManager - true if the current user has the vfs manager role a list of I_CmsHistoryResource objects
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.readResource(CmsUUIDint)
See Also:   CmsObject.readResources(StringCmsResourceFilterboolean)
See Also:   CmsObject.readDeletedResources(Stringboolean)




readFile
public CmsFile readFile(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Reads a file resource (including it's binary content) from the VFS, using the specified resource filter.

In case you do not need the file content, use CmsDriverManager.readResource(CmsDbContext,String,CmsResourceFilter) instead.

The specified filter controls what kind of resources should be "found" during the read operation. This will depend on the application. For example, using CmsResourceFilter.DEFAULT will only return currently "valid" resources, while using CmsResourceFilter.IGNORE_EXPIRATION will ignore the date release / date expired information of the resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the base file resource (without content) the file read from the VFS
throws:
  CmsException - if operation was not successful




readFolder
public CmsFolder readFolder(CmsDbContext dbc, String resourcename, CmsResourceFilter filter) throws CmsDataAccessException(Code)
Reads a folder from the VFS, using the specified resource filter.


Parameters:
  dbc - the current database context
Parameters:
  resourcename - the name of the folder to read (full path)
Parameters:
  filter - the resource filter to use while reading the folder that was read
throws:
  CmsDataAccessException - if something goes wrong
See Also:   CmsDriverManager.readResource(CmsDbContext,String,CmsResourceFilter)
See Also:   CmsObject.readFolder(String)
See Also:   CmsObject.readFolder(StringCmsResourceFilter)




readGroup
public CmsGroup readGroup(CmsDbContext dbc, CmsProject project)(Code)
Reads the group of a project.


Parameters:
  dbc - the current database context
Parameters:
  project - the project to read from the group of a resource




readGroup
public CmsGroup readGroup(CmsDbContext dbc, CmsUUID groupId) throws CmsException(Code)
Reads a group based on its id.


Parameters:
  dbc - the current database context
Parameters:
  groupId - the id of the group that is to be read the requested group
throws:
  CmsException - if operation was not successful




readGroup
public CmsGroup readGroup(CmsDbContext dbc, String groupname) throws CmsDataAccessException(Code)
Reads a group based on its name.


Parameters:
  dbc - the current database context
Parameters:
  groupname - the name of the group that is to be read the requested group
throws:
  CmsDataAccessException - if operation was not successful




readHistoricalPrincipal
public CmsHistoryPrincipal readHistoricalPrincipal(CmsDbContext dbc, CmsUUID principalId) throws CmsException(Code)
Reads a principal (an user or group) from the historical archive based on its ID.


Parameters:
  dbc - the current database context
Parameters:
  principalId - the id of the principal to read the historical principal entry with the given id
throws:
  CmsException - if something goes wrong, ie. CmsDbEntryNotFoundException
See Also:   CmsObject.readUser(CmsUUID)
See Also:   CmsObject.readGroup(CmsUUID)
See Also:   CmsObject.readHistoryPrincipal(CmsUUID)




readHistoryProject
public CmsHistoryProject readHistoryProject(CmsDbContext dbc, int publishTag) throws CmsException(Code)
Returns a historical project entry.


Parameters:
  dbc - the current database context
Parameters:
  publishTag - the publish tag of the project the requested historical project entry
throws:
  CmsException - if something goes wrong




readHistoryPropertyObjects
public List readHistoryPropertyObjects(CmsDbContext dbc, I_CmsHistoryResource historyResource) throws CmsException(Code)
Reads the list of all CmsProperty objects that belongs to the given historical resource.


Parameters:
  dbc - the current database context
Parameters:
  historyResource - the historical resource to read the properties for the list of CmsProperty objects
throws:
  CmsException - if something goes wrong




readLocks
public void readLocks(CmsDbContext dbc) throws CmsException(Code)
Reads the locks that were saved to the database in the previous run of OpenCms.


Parameters:
  dbc - the current database context
throws:
  CmsException - if something goes wrong




readManagerGroup
public CmsGroup readManagerGroup(CmsDbContext dbc, CmsProject project)(Code)
Reads the manager group of a project.


Parameters:
  dbc - the current database context
Parameters:
  project - the project to read from the group of a resource




readOrganizationalUnit
public CmsOrganizationalUnit readOrganizationalUnit(CmsDbContext dbc, String ouFqn) throws CmsException(Code)
Reads an organizational Unit based on its fully qualified name.


Parameters:
  dbc - the current db context
Parameters:
  ouFqn - the fully qualified name of the organizational Unit to be read the organizational Unit that with the provided fully qualified name
throws:
  CmsException - if something goes wrong




readOwner
public CmsUser readOwner(CmsDbContext dbc, CmsProject project) throws CmsException(Code)
Reads the owner of a project.


Parameters:
  dbc - the current database context
Parameters:
  project - the project to get the owner from the owner of a resource
throws:
  CmsException - if something goes wrong




readPath
public List readPath(CmsDbContext dbc, CmsUUID projectId, String path, CmsResourceFilter filter) throws CmsException(Code)
Builds a list of resources for a given path.


Parameters:
  dbc - the current database context
Parameters:
  projectId - the project to lookup the resource
Parameters:
  path - the requested path
Parameters:
  filter - a filter object (only "includeDeleted" information is used!) list of CmsResources
throws:
  CmsException - if something goes wrong




readProject
public CmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException(Code)
Reads a project given the projects id.


Parameters:
  dbc - the current database context
Parameters:
  id - the id of the project the project read
throws:
  CmsDataAccessException - if something goes wrong




readProject
public CmsProject readProject(CmsDbContext dbc, String name) throws CmsException(Code)
Reads a project.

Important: Since a project name can be used multiple times, this is NOT the most efficient way to read the project. This is only a convenience for front end developing. Reading a project by name will return the first project with that name. All core classes must use the id version CmsDriverManager.readProject(CmsDbContext,CmsUUID) to ensure the right project is read.


Parameters:
  dbc - the current database context
Parameters:
  name - the name of the project the project read
throws:
  CmsException - if something goes wrong




readProjectResources
public List readProjectResources(CmsDbContext dbc, CmsProject project) throws CmsException(Code)
Returns the list of all resource names that define the "view" of the given project.


Parameters:
  dbc - the current database context
Parameters:
  project - the project to get the project resources for the list of all resources, as String objects that define the "view" of the given project.
throws:
  CmsException - if something goes wrong




readProjectView
public List readProjectView(CmsDbContext dbc, CmsUUID projectId, CmsResourceState state) throws CmsException(Code)
Reads all resources of a project that match a given state from the VFS.

Possible values for the state parameter are:


Parameters:
  dbc - the current database context
Parameters:
  projectId - the id of the project to read the file resources for
Parameters:
  state - the resource state to match a list of CmsResource objects matching the filter criteria
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.readProjectView(CmsUUIDCmsResourceState)




readPropertyDefinition
public CmsPropertyDefinition readPropertyDefinition(CmsDbContext dbc, String name) throws CmsException(Code)
Reads a property definition.

If no property definition with the given name is found, null is returned.


Parameters:
  dbc - the current database context
Parameters:
  name - the name of the property definition to read the property definition that was read, or null if there is no property definition with the given name.
throws:
  CmsException - if something goes wrong




readPropertyObject
public CmsProperty readPropertyObject(CmsDbContext dbc, CmsResource resource, String key, boolean search) throws CmsException(Code)
Reads a property object from a resource specified by a property name.

Returns CmsProperty.getNullProperty if the property is not found.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource where the property is read from
Parameters:
  key - the property key name
Parameters:
  search - if true, the property is searched on all parent folders of the resource. if it's not found attached directly to the resource. the required property, or CmsProperty.getNullProperty if the property was not found
throws:
  CmsException - if something goes wrong




readPropertyObjects
public List readPropertyObjects(CmsDbContext dbc, CmsResource resource, boolean search) throws CmsException(Code)
Reads all property objects mapped to a specified resource from the database.

All properties in the result List will be in frozen (read only) state, so you can't change the values.

Returns an empty list if no properties are found at all.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource where the properties are read from
Parameters:
  search - true, if the properties should be searched on all parent folders if not found on the resource a list of CmsProperty objects containing the structure and/or resource value
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.readPropertyObjects(Stringboolean)




readPublishJob
public CmsPublishJobInfoBean readPublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException(Code)
Reads a single publish job identified by its publish history id.


Parameters:
  dbc - the current database context
Parameters:
  publishHistoryId - unique id to identify the publish job in the publish history an object of type CmsPublishJobInfoBean
throws:
  CmsException - if something goes wrong




readPublishJobs
public List readPublishJobs(CmsDbContext dbc, long startTime, long endTime) throws CmsException(Code)
Reads all available publish jobs.


Parameters:
  dbc - the current database context
Parameters:
  startTime - the start of the time range for finish time
Parameters:
  endTime - the end of the time range for finish time a list of objects of type CmsPublishJobInfoBean
throws:
  CmsException - if something goes wrong




readPublishList
public CmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException(Code)
Reads the publish list assigned to a publish job.


Parameters:
  dbc - the current database context
Parameters:
  publishHistoryId - the history id identifying the publish job the assigned publish list
throws:
  CmsException - if something goes wrong




readPublishReportContents
public byte[] readPublishReportContents(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException(Code)
Reads the publish report assigned to a publish job.


Parameters:
  dbc - the current database context
Parameters:
  publishHistoryId - the history id identifying the publish job the content of the assigned publish report
throws:
  CmsException - if something goes wrong




readPublishedResources
public List readPublishedResources(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsException(Code)
Reads the resources that were published in a publish task for a given publish history ID.


Parameters:
  dbc - the current database context
Parameters:
  publishHistoryId - unique int ID to identify each publish task in the publish history a list of org.opencms.db.CmsPublishedResource objects
throws:
  CmsException - if something goes wrong




readResource
public I_CmsHistoryResource readResource(CmsDbContext dbc, CmsResource resource, int version) throws CmsException(Code)
Reads an historical resource entry for the given resource and with the given version number.


Parameters:
  dbc - the current db context
Parameters:
  resource - the resource to be read
Parameters:
  version - the version number to retrieve the resource that was read
throws:
  CmsException - if the resource could not be read for any reason
See Also:   CmsObject.restoreResourceVersion(CmsUUIDint)
See Also:   CmsObject.readResource(CmsUUIDint)




readResource
public CmsResource readResource(CmsDbContext dbc, CmsUUID structureID, CmsResourceFilter filter) throws CmsDataAccessException(Code)
Reads a resource from the VFS, using the specified resource filter.


Parameters:
  dbc - the current database context
Parameters:
  structureID - the structure id of the resource to read
Parameters:
  filter - the resource filter to use while reading the resource that was read
throws:
  CmsDataAccessException - if something goes wrong
See Also:   CmsObject.readResource(CmsUUIDCmsResourceFilter)
See Also:   CmsObject.readResource(CmsUUID)




readResource
public CmsResource readResource(CmsDbContext dbc, String resourcePath, CmsResourceFilter filter) throws CmsDataAccessException(Code)
Reads a resource from the VFS, using the specified resource filter.


Parameters:
  dbc - the current database context
Parameters:
  resourcePath - the name of the resource to read (full path)
Parameters:
  filter - the resource filter to use while reading the resource that was read
throws:
  CmsDataAccessException - if something goes wrong
See Also:   CmsObject.readResource(StringCmsResourceFilter)
See Also:   CmsObject.readResource(String)
See Also:   CmsObject.readFile(CmsResource)




readResourceForPublishTag
public I_CmsHistoryResource readResourceForPublishTag(CmsDbContext dbc, CmsResource resource, int publishTag) throws CmsException(Code)
Reads a resource in the current project with the given publish tag from the historical archive.


Parameters:
  dbc - the current db context
Parameters:
  resource - the resource to restore from the archive
Parameters:
  publishTag - the publish tag of the resource the file in the current project with the given publish tag from the historical archive, orCmsVfsResourceNotFoundException if not found
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.readResource(CmsUUIDint)
See Also:   CmsObject.readResourceByPublishTag(CmsUUIDint)CmsDriverManager.readResource(CmsDbContext,CmsResource,int)




readResources
public List readResources(CmsDbContext dbc, CmsResource parent, CmsResourceFilter filter, boolean readTree) throws CmsException, CmsDataAccessException(Code)
Reads all resources below the given path matching the filter criteria, including the full tree below the path only in case the readTree parameter is true.


Parameters:
  dbc - the current database context
Parameters:
  parent - the parent path to read the resources from
Parameters:
  filter - the filter
Parameters:
  readTree - true to read all subresources a list of CmsResource objects matching the filter criteria
throws:
  CmsDataAccessException - if the bare reading of the resources fails
throws:
  CmsException - if security and permission checks for the resources read fail




readResourcesWithProperty
public List readResourcesWithProperty(CmsDbContext dbc, CmsResource folder, String propertyDefinition, String value, CmsResourceFilter filter) throws CmsException(Code)
Reads all resources that have a value (containing the given value string) set for the specified property (definition) in the given path.

Both individual and shared properties of a resource are checked.

If the value parameter is null, all resources having the given property set are returned.


Parameters:
  dbc - the current database context
Parameters:
  folder - the folder to get the resources with the property from
Parameters:
  propertyDefinition - the name of the property (definition) to check for
Parameters:
  value - the string to search in the value of the property
Parameters:
  filter - the resource filter to apply to the result set a list of all CmsResource objects that have a value set for the specified property.
throws:
  CmsException - if something goes wrong




readResponsiblePrincipals
public Set readResponsiblePrincipals(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Returns the set of users that are responsible for a specific resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to get the responsible users from the set of users that are responsible for a specific resource
throws:
  CmsException - if something goes wrong




readResponsibleUsers
public Set readResponsibleUsers(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Returns the set of users that are responsible for a specific resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to get the responsible users from the set of users that are responsible for a specific resource
throws:
  CmsException - if something goes wrong




readSiblings
public List readSiblings(CmsDbContext dbc, CmsResource resource, CmsResourceFilter filter) throws CmsException(Code)
Returns a List of all siblings of the specified resource, the specified resource being always part of the result set.

The result is a list of CmsResource objects.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to read the siblings for
Parameters:
  filter - a filter object a list of CmsResource Objects that are siblings to the specified resource, including the specified resource itself
throws:
  CmsException - if something goes wrong




readStaticExportPublishedResourceParameters
public String readStaticExportPublishedResourceParameters(CmsDbContext dbc, String rfsName) throws CmsException(Code)
Returns the parameters of a resource in the table of all published template resources.


Parameters:
  dbc - the current database context
Parameters:
  rfsName - the rfs name of the resource the parameter string of the requested resource
throws:
  CmsException - if something goes wrong




readStaticExportResources
public List readStaticExportResources(CmsDbContext dbc, int parameterResources, long timestamp) throws CmsException(Code)
Returns a list of all template resources which must be processed during a static export.


Parameters:
  dbc - the current database context
Parameters:
  parameterResources - flag for reading resources with parameters (1) or without (0)
Parameters:
  timestamp - for reading the data from the db a list of template resources as String objects
throws:
  CmsException - if something goes wrong




readUser
public CmsUser readUser(CmsDbContext dbc, CmsUUID id) throws CmsException(Code)
Returns a user object based on the id of a user.


Parameters:
  dbc - the current database context
Parameters:
  id - the id of the user to read the user read
throws:
  CmsException - if something goes wrong




readUser
public CmsUser readUser(CmsDbContext dbc, String username) throws CmsDataAccessException(Code)
Returns a user object.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user that is to be read user read
throws:
  CmsDataAccessException - if operation was not successful




readUser
public CmsUser readUser(CmsDbContext dbc, String username, String password) throws CmsException(Code)
Returns a user object if the password for the user is correct.

If the user/pwd pair is not valid a CmsException is thrown.


Parameters:
  dbc - the current database context
Parameters:
  username - the username of the user that is to be read
Parameters:
  password - the password of the user that is to be read user read
throws:
  CmsException - if operation was not successful




removeAccessControlEntry
public void removeAccessControlEntry(CmsDbContext dbc, CmsResource resource, CmsUUID principal) throws CmsException(Code)
Removes an access control entry for a given resource and principal.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource
Parameters:
  principal - the id of the principal to remove the the access control entry for
throws:
  CmsException - if something goes wrong




removeResourceFromOrgUnit
public void removeResourceFromOrgUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsResource resource) throws CmsException(Code)
Removes a resource from the given organizational unit.


Parameters:
  dbc - the current db context
Parameters:
  orgUnit - the organizational unit to remove the resource from
Parameters:
  resource - the resource that is to be removed from the organizational unit
throws:
  CmsException - if something goes wrong
See Also:   org.opencms.security.CmsOrgUnitManager.addResourceToOrgUnit(CmsObjectStringString)
See Also:   org.opencms.security.CmsOrgUnitManager.addResourceToOrgUnit(CmsObjectStringString)




removeResourceFromProject
public void removeResourceFromProject(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Removes a resource from the current project of the user.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to apply this operation to
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.copyResourceToProject(String)
See Also:   I_CmsResourceType.copyResourceToProject(CmsObjectCmsSecurityManagerCmsResource)




removeUserFromGroup
public void removeUserFromGroup(CmsDbContext dbc, String username, String groupname, boolean readRoles) throws CmsException, CmsIllegalArgumentException, CmsDbEntryNotFoundException, CmsSecurityException(Code)
Removes a user from a group.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user that is to be removed from the group
Parameters:
  groupname - the name of the group
Parameters:
  readRoles - if to read roles or groups
throws:
  CmsException - if operation was not successful
throws:
  CmsIllegalArgumentException - if the given user was not member in the given group
throws:
  CmsDbEntryNotFoundException - if the given group was not found
throws:
  CmsSecurityException - if the given user was read as 'null' from the database
See Also:   CmsDriverManager.addUserToGroup(CmsDbContext,String,String,boolean)




replaceResource
public void replaceResource(CmsDbContext dbc, CmsResource resource, int type, byte[] content, List properties) throws CmsException(Code)
Replaces the content, type and properties of a resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the name of the resource to apply this operation to
Parameters:
  type - the new type of the resource
Parameters:
  content - the new content of the resource
Parameters:
  properties - the new properties of the resource
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.replaceResource(Stringintbyte[]List)
See Also:   I_CmsResourceType.replaceResource(CmsObjectCmsSecurityManagerCmsResourceintbyte[]List)




resetPassword
public void resetPassword(CmsDbContext dbc, String username, String oldPassword, String newPassword) throws CmsException, CmsSecurityException(Code)
Resets the password for a specified user.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user
Parameters:
  oldPassword - the old password
Parameters:
  newPassword - the new password
throws:
  CmsException - if the user data could not be read from the database
throws:
  CmsSecurityException - if the specified username and old password could not be verified




restoreDeletedResource
public void restoreDeletedResource(CmsDbContext dbc, CmsUUID structureId) throws CmsException(Code)
Restores a deleted resource identified by its structure id from the historical archive.


Parameters:
  dbc - the current database context
Parameters:
  structureId - the structure id of the resource to restore
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.restoreDeletedResource(CmsUUID)




restoreResource
public void restoreResource(CmsDbContext dbc, CmsResource resource, int version) throws CmsException(Code)
Restores a resource in the current project with a version from the historical archive.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to restore from the archive
Parameters:
  version - the version number to restore from the archive
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.restoreResourceVersion(CmsUUIDint)
See Also:   I_CmsResourceType.restoreResource(CmsObjectCmsSecurityManagerCmsResourceint)




setDateExpired
public void setDateExpired(CmsDbContext dbc, CmsResource resource, long dateExpired) throws CmsDataAccessException(Code)
Changes the "expire" date of a resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to touch
Parameters:
  dateExpired - the new expire date of the resource
throws:
  CmsDataAccessException - if something goes wrong
See Also:   CmsObject.setDateExpired(Stringlongboolean)
See Also:   I_CmsResourceType.setDateExpired(CmsObjectCmsSecurityManagerCmsResourcelongboolean)




setDateLastModified
public void setDateLastModified(CmsDbContext dbc, CmsResource resource, long dateLastModified) throws CmsDataAccessException(Code)
Changes the "last modified" timestamp of a resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to touch
Parameters:
  dateLastModified - the new last modified date of the resource
throws:
  CmsDataAccessException - if something goes wrong
See Also:   CmsObject.setDateLastModified(Stringlongboolean)
See Also:   I_CmsResourceType.setDateLastModified(CmsObjectCmsSecurityManagerCmsResourcelongboolean)




setDateReleased
public void setDateReleased(CmsDbContext dbc, CmsResource resource, long dateReleased) throws CmsDataAccessException(Code)
Changes the "release" date of a resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to touch
Parameters:
  dateReleased - the new release date of the resource
throws:
  CmsDataAccessException - if something goes wrong
See Also:   CmsObject.setDateReleased(Stringlongboolean)
See Also:   I_CmsResourceType.setDateReleased(CmsObjectCmsSecurityManagerCmsResourcelongboolean)




setParentGroup
public void setParentGroup(CmsDbContext dbc, String groupName, String parentGroupName) throws CmsException, CmsDataAccessException(Code)
Sets a new parent group for an already existing group.


Parameters:
  dbc - the current database context
Parameters:
  groupName - the name of the group that should be written
Parameters:
  parentGroupName - the name of the parent group to set, or null if the parentgroup should be deleted.
throws:
  CmsException - if operation was not successful
throws:
  CmsDataAccessException - if the group with groupName could not be read from VFS




setPassword
public void setPassword(CmsDbContext dbc, String username, String newPassword) throws CmsException, CmsIllegalArgumentException(Code)
Sets the password for a user.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user
Parameters:
  newPassword - the new password
throws:
  CmsException - if operation was not successful
throws:
  CmsIllegalArgumentException - if the user with the username was not found




setUsersOrganizationalUnit
public void setUsersOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsUser user) throws CmsException(Code)
Moves an user to the given organizational unit.


Parameters:
  dbc - the current db context
Parameters:
  orgUnit - the organizational unit to add the resource to
Parameters:
  user - the user that is to be moved to the organizational unit
throws:
  CmsException - if something goes wrong
See Also:   org.opencms.security.CmsOrgUnitManager.setUsersOrganizationalUnit(CmsObjectStringString)




undelete
public void undelete(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Undelete the resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the name of the resource to apply this operation to
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.undeleteResource(Stringboolean)
See Also:   I_CmsResourceType.undelete(CmsObjectCmsSecurityManagerCmsResourceboolean)




undoChanges
public void undoChanges(CmsDbContext dbc, CmsResource resource, CmsResource.CmsResourceUndoMode mode) throws CmsException(Code)
Undos all changes in the resource by restoring the version from the online project to the current offline project.


Parameters:
  dbc - the current database context
Parameters:
  resource - the name of the resource to apply this operation to
Parameters:
  mode - the undo mode, one of the org.opencms.file.CmsResource.CmsResourceUndoMode#UNDO_XXX constants please note that the recursive flag is ignored at this level
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.undoChanges(StringCmsResource.CmsResourceUndoMode)
See Also:   I_CmsResourceType.undoChanges(CmsObjectCmsSecurityManagerCmsResourceCmsResource.CmsResourceUndoMode)




unlockProject
public void unlockProject(CmsProject project)(Code)
Unlocks all resources in the given project.


Parameters:
  project - the project to unlock the resources in




unlockResource
public void unlockResource(CmsDbContext dbc, CmsResource resource, boolean force, boolean removeSystemLock) throws CmsException(Code)
Unlocks a resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to unlock
Parameters:
  force - true, if a resource is forced to get unlocked, no matter by which user and in which project the resource is currently locked
Parameters:
  removeSystemLock - true, if you also want to remove system locks
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.unlockResource(String)
See Also:   I_CmsResourceType.unlockResource(CmsObjectCmsSecurityManagerCmsResource)




updateExportPoints
public void updateExportPoints(CmsDbContext dbc)(Code)
Update the export points.

All files and folders "inside" an export point are written.


Parameters:
  dbc - the current database context




updateRelationsForResource
public void updateRelationsForResource(CmsDbContext dbc, CmsResource resource, List links) throws CmsException(Code)
Updates/Creates the given relations for the given resource.


Parameters:
  dbc - the db context
Parameters:
  resource - the resource to update the relations for
Parameters:
  links - the links to consider for updating
throws:
  CmsException - if something goes wrong
See Also:   CmsSecurityManager.updateRelationsForResource(CmsRequestContextCmsResourceList)




userInGroup
public boolean userInGroup(CmsDbContext dbc, String username, String groupname, boolean readRoles) throws CmsException(Code)
Returns true if a user is member of the given group.


Parameters:
  dbc - the current database context
Parameters:
  username - the name of the user to check
Parameters:
  groupname - the name of the group to check
Parameters:
  readRoles - if to read roles or groups true, if the user is in the group, false otherwise
throws:
  CmsException - if something goes wrong




validatePassword
public void validatePassword(String password) throws CmsSecurityException(Code)
This method checks if a new password follows the rules for new passwords, which are defined by a Class implementing the org.opencms.security.I_CmsPasswordHandler interface and configured in the opencms.properties file.

If this method throws no exception the password is valid.


Parameters:
  password - the new password that has to be checked
throws:
  CmsSecurityException - if the password is not valid




validateRelations
public Map validateRelations(CmsDbContext dbc, CmsPublishList publishList, I_CmsReport report) throws Exception(Code)
Validates the relations for the given resources.


Parameters:
  dbc - the database context
Parameters:
  publishList - the resources to validate during publishing
Parameters:
  report - a report to write the messages to a map with lists of invalid links (org.opencms.relations.CmsRelation} objects) keyed by root paths
throws:
  Exception - if something goes wrong




writeAccessControlEntry
public void writeAccessControlEntry(CmsDbContext dbc, CmsResource resource, CmsAccessControlEntry ace) throws CmsException(Code)
Writes an access control entries to a given resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource
Parameters:
  ace - the entry to write
throws:
  CmsException - if something goes wrong




writeExportPoints
public void writeExportPoints(CmsDbContext dbc, I_CmsReport report, CmsUUID publishHistoryId)(Code)
Writes all export points into the file system for the publish task specified by trhe given publish history ID.


Parameters:
  dbc - the current database context
Parameters:
  report - an I_CmsReport instance to print output message, or null to write messages to the log file
Parameters:
  publishHistoryId - ID to identify the publish task in the publish history




writeFile
public CmsFile writeFile(CmsDbContext dbc, CmsFile resource) throws CmsException(Code)
Writes a resource to the OpenCms VFS, including it's content.

Applies only to resources of type CmsFile i.e. resources that have a binary content attached.

Certain resource types might apply content validation or transformation rules before the resource is actually written to the VFS. The returned result might therefore be a modified version from the provided original.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to apply this operation to the written resource (may have been modified)
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.writeFile(CmsFile)
See Also:   I_CmsResourceType.writeFile(CmsObjectCmsSecurityManagerCmsFile)




writeGroup
public void writeGroup(CmsDbContext dbc, CmsGroup group) throws CmsException(Code)
Writes an already existing group.

The group id has to be a valid OpenCms group id.
The group with the given id will be completely overridden by the given data.


Parameters:
  dbc - the current database context
Parameters:
  group - the group that should be written
throws:
  CmsException - if operation was not successful




writeHistoryProject
public void writeHistoryProject(CmsDbContext dbc, int publishTag, long publishDate) throws CmsDataAccessException(Code)
Creates an historical entry of the current project.


Parameters:
  dbc - the current database context
Parameters:
  publishTag - the version
Parameters:
  publishDate - the date of publishing
throws:
  CmsDataAccessException - if operation was not successful




writeLocks
public void writeLocks(CmsDbContext dbc) throws CmsException(Code)
Writes the locks that are currently stored in-memory to the database to allow restoring them in future server startups.

This overwrites the locks previously stored in the underlying database table.


Parameters:
  dbc - the current database context
throws:
  CmsException - if something goes wrong




writeOrganizationalUnit
public void writeOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit) throws CmsException(Code)
Writes an already existing organizational unit.

The organizational unit id has to be a valid OpenCms organizational unit id.
The organizational unit with the given id will be completely overridden by the given data.


Parameters:
  dbc - the current db context
Parameters:
  organizationalUnit - the organizational unit that should be written
throws:
  CmsException - if operation was not successful
See Also:   org.opencms.security.CmsOrgUnitManager.writeOrganizationalUnit(CmsObjectCmsOrganizationalUnit)




writeProject
public void writeProject(CmsDbContext dbc, CmsProject project) throws CmsException(Code)
Writes an already existing project.

The project id has to be a valid OpenCms project id.
The project with the given id will be completely overridden by the given data.


Parameters:
  dbc - the current database context
Parameters:
  project - the project that should be written
throws:
  CmsException - if operation was not successful




writePropertyObject
public void writePropertyObject(CmsDbContext dbc, CmsResource resource, CmsProperty property) throws CmsException(Code)
Writes a property for a specified resource.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to write the property for
Parameters:
  property - the property to write
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.writePropertyObject(StringCmsProperty)
See Also:   I_CmsResourceType.writePropertyObject(CmsObjectCmsSecurityManagerCmsResourceCmsProperty)




writePropertyObjects
public void writePropertyObjects(CmsDbContext dbc, CmsResource resource, List properties, boolean updateState) throws CmsException(Code)
Writes a list of properties for a specified resource.

Code calling this method has to ensure that the no properties a, b are contained in the specified list so that a.equals(b), otherwise an exception is thrown.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to write the properties for
Parameters:
  properties - the list of properties to write
Parameters:
  updateState - if true the state of the resource will be updated
throws:
  CmsException - if something goes wrong
See Also:   CmsObject.writePropertyObjects(StringList)
See Also:   I_CmsResourceType.writePropertyObjects(CmsObjectCmsSecurityManagerCmsResourceList)




writePublishJob
public void writePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException(Code)
Updates a publish job.


Parameters:
  dbc - the current database context
Parameters:
  publishJob - the publish job to update
throws:
  CmsException - if something goes wrong




writePublishReport
public void writePublishReport(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException(Code)
Writes the publish report for a publish job.


Parameters:
  dbc - the current database context
Parameters:
  publishJob - the publish job
throws:
  CmsException - if something goes wrong




writeResource
public void writeResource(CmsDbContext dbc, CmsResource resource) throws CmsException(Code)
Writes a resource to the OpenCms VFS.


Parameters:
  dbc - the current database context
Parameters:
  resource - the resource to write
throws:
  CmsException - if something goes wrong




writeStaticExportPublishedResource
public void writeStaticExportPublishedResource(CmsDbContext dbc, String resourceName, int linkType, String linkParameter, long timestamp) throws CmsException(Code)
Inserts an entry in the published resource table.

This is done during static export.


Parameters:
  dbc - the current database context
Parameters:
  resourceName - The name of the resource to be added to the static export
Parameters:
  linkType - the type of resource exported (0= non-parameter, 1=parameter)
Parameters:
  linkParameter - the parameters added to the resource
Parameters:
  timestamp - a time stamp for writing the data into the db
throws:
  CmsException - if something goes wrong




writeUser
public void writeUser(CmsDbContext dbc, CmsUser user) throws CmsException(Code)
Updates the user information.

The user id has to be a valid OpenCms user id.
The user with the given id will be completely overridden by the given data.


Parameters:
  dbc - the current database context
Parameters:
  user - the user to be updated
throws:
  CmsException - if operation was not successful




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.