| java.lang.Object org.opencms.db.generic.CmsHistoryDriver
All known Subclasses: org.opencms.db.generic.CmsBackupDriver, org.opencms.db.hsqldb.CmsHistoryDriver, org.opencms.db.as400.CmsHistoryDriver, org.opencms.db.db2.CmsHistoryDriver, org.opencms.db.oracle.CmsHistoryDriver, org.opencms.db.postgresql.CmsHistoryDriver, org.opencms.db.mysql.CmsHistoryDriver, org.opencms.db.mssql.CmsHistoryDriver,
CmsHistoryDriver | public class CmsHistoryDriver implements I_CmsDriver,I_CmsHistoryDriver(Code) | | Generic (ANSI-SQL) database server implementation of the history driver methods.
author: Thomas Weckert author: Michael Emmerich author: Carsten Weinholz author: Michael Moossen version: $Revision: 1.9 $ since: 6.9.1 |
Method Summary | |
public CmsPropertyDefinition | createPropertyDefinition(CmsDbContext dbc, String name, CmsPropertyDefinition.CmsPropertyType type) | public int | deleteEntries(CmsDbContext dbc, I_CmsHistoryResource resource, int versionsToKeep, long time) | public void | deletePropertyDefinition(CmsDbContext dbc, CmsPropertyDefinition metadef) | public void | destroy() | public List | getAllDeletedEntries(CmsDbContext dbc, CmsUUID parentId) | public List | getAllNotDeletedEntries(CmsDbContext dbc, CmsUUID parentId) | public CmsSqlManager | getSqlManager() | public void | init(CmsDbContext dbc, CmsConfigurationManager configurationManager, List successiveDrivers, CmsDriverManager driverManager) | public org.opencms.db.generic.CmsSqlManager | initSqlManager(String classname) | protected void | internalAddToPropMap(Map propertyMap, I_CmsHistoryResource resource, String propertyKey, String propertyValue, int mappingType) | protected void | internalCleanup(CmsDbContext dbc, I_CmsHistoryResource resource) | protected int | internalCountProperties(CmsDbContext dbc, CmsPropertyDefinition metadef, CmsUUID projectId) | protected CmsHistoryProject | internalCreateProject(ResultSet res, List resources) | protected I_CmsHistoryResource | internalCreateResource(ResultSet res) | protected List | internalFilterParentId(CmsUUID parentId, List resources) | protected I_CmsHistoryResource | internalMergeResource(I_CmsHistoryResource histRes, ResultSet res, int versionOffset) | protected boolean | internalValidateResource(CmsDbContext dbc, CmsResource resource, int publishTag) | public List | readAllAvailableVersions(CmsDbContext dbc, CmsUUID structureId) | public byte[] | readContent(CmsDbContext dbc, CmsUUID resourceId, int publishTag) | public List | readDeletedResources(CmsDbContext dbc, CmsUUID structureId, CmsUUID userId) | public I_CmsHistoryResource | readFile(CmsDbContext dbc, CmsUUID structureId, int tagId) | public int | readLastVersion(CmsDbContext dbc, CmsUUID structureId) | public int | readMaxPublishTag(CmsDbContext dbc, CmsUUID resourceId) | public int | readNextPublishTag(CmsDbContext dbc) | public CmsHistoryPrincipal | readPrincipal(CmsDbContext dbc, CmsUUID principalId) | public CmsHistoryProject | readProject(CmsDbContext dbc, int publishTag) | public List | readProjectResources(CmsDbContext dbc, int publishTag) | public List | readProjects(CmsDbContext dbc) | public List | readProperties(CmsDbContext dbc, I_CmsHistoryResource resource) | public CmsPropertyDefinition | readPropertyDefinition(CmsDbContext dbc, String name) | public int | readPublishTag(CmsDbContext dbc, long maxdate) | public I_CmsHistoryResource | readResource(CmsDbContext dbc, CmsUUID structureId, int version) | public void | writePrincipal(CmsDbContext dbc, I_CmsPrincipal principal) | public void | writeProject(CmsDbContext dbc, int publishTag, long publishDate) | public void | writeProperties(CmsDbContext dbc, CmsResource resource, List properties, int publishTag) | public void | writeResource(CmsDbContext dbc, CmsResource resource, List properties, int publishTag) |
internalAddToPropMap | protected void internalAddToPropMap(Map propertyMap, I_CmsHistoryResource resource, String propertyKey, String propertyValue, int mappingType) throws CmsDbConsistencyException(Code) | | Updates the property map for the given resource with the given property data.
Parameters: propertyMap - the map to update Parameters: resource - the resource the properties belong to Parameters: propertyKey - the property key Parameters: propertyValue - the property value Parameters: mappingType - the mapping type throws: CmsDbConsistencyException - if the mapping type is wrong |
internalCountProperties | protected int internalCountProperties(CmsDbContext dbc, CmsPropertyDefinition metadef, CmsUUID projectId) throws CmsDataAccessException(Code) | | Returns the amount of properties for a propertydefinition.
Parameters: dbc - the current database context Parameters: metadef - the propertydefinition to test Parameters: projectId - the ID of the current project the amount of properties for a propertydefinition throws: CmsDataAccessException - if something goes wrong |
internalCreateProject | protected CmsHistoryProject internalCreateProject(ResultSet res, List resources) throws SQLException(Code) | | Creates a historical project from the given result set and resources.
Parameters: res - the resource set Parameters: resources - the historical resources the historical project throws: SQLException - if something goes wrong |
internalFilterParentId | protected List internalFilterParentId(CmsUUID parentId, List resources)(Code) | | Filters all resources in the subtree of the folder identified by the given id.
Parameters: parentId - the id of the folder to filter Parameters: resources - the resources to filter the filtered list of resource |
internalMergeResource | protected I_CmsHistoryResource internalMergeResource(I_CmsHistoryResource histRes, ResultSet res, int versionOffset) throws SQLException(Code) | | Merges an historical entry for a sibling, based on the structure data from the given historical resource
and result set for the resource entry.
Parameters: histRes - the original historical entry Parameters: res - the result set of the resource entry Parameters: versionOffset - the offset for the structure version a merged historical entry for the sibling throws: SQLException - if something goes wrong |
internalValidateResource | protected boolean internalValidateResource(CmsDbContext dbc, CmsResource resource, int publishTag) throws CmsDataAccessException(Code) | | Tests if a history resource does exist.
Parameters: dbc - the current database context Parameters: resource - the resource to test Parameters: publishTag - the publish tag of the resource to test true if the resource already exists, false otherwise throws: CmsDataAccessException - if something goes wrong |
|
|