|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.db.generic.CmsProjectDriver
public class CmsProjectDriver
Generic (ANSI-SQL) implementation of the project driver methods.
| Field Summary | |
|---|---|
static String |
DBC_ATTR_READ_PROJECT_FOR_RESOURCE
Attribute name for reading the project of a resource. |
protected CmsDriverManager |
m_driverManager
The driver manager. |
protected CmsSqlManager |
m_sqlManager
The SQL manager. |
| Fields inherited from interface org.opencms.db.I_CmsDriver |
|---|
AND_CONDITION, BEGIN_CONDITION, BEGIN_EXCLUDE_CONDITION, BEGIN_INCLUDE_CONDITION, END_CONDITION, OR_CONDITION |
| Fields inherited from interface org.opencms.db.I_CmsProjectDriver |
|---|
DRIVER_TYPE_ID, SETUP_PROJECT_NAME, TEMP_FILE_PROJECT_NAME |
| Constructor Summary | |
|---|---|
CmsProjectDriver()
|
|
| Method Summary | |
|---|---|
CmsProject |
createProject(CmsDbContext dbc,
CmsUUID id,
CmsUser owner,
CmsGroup group,
CmsGroup managergroup,
String projectFqn,
String description,
int flags,
CmsProject.CmsProjectType type)
Creates a new project. |
void |
createProjectResource(CmsDbContext dbc,
CmsUUID projectId,
String resourcePath)
Creates a new projectResource from a given CmsResource object. |
void |
createPublishJob(CmsDbContext dbc,
CmsPublishJobInfoBean publishJob)
Inserts an entry for a publish job . |
protected CmsPublishJobInfoBean |
createPublishJobInfoBean(ResultSet res)
Creates a CmsPublishJobInfoBean from a result set. |
void |
deleteAllStaticExportPublishedResources(CmsDbContext dbc,
int linkType)
Deletes all entries in the published resource table. |
void |
deleteLog(CmsDbContext dbc,
CmsLogFilter filter)
Deletes log entries matching the given filter. |
void |
deleteProject(CmsDbContext dbc,
CmsProject project)
Deletes a project from the cms. |
void |
deleteProjectResource(CmsDbContext dbc,
CmsUUID projectId,
String resourceName)
Delete a projectResource from an given CmsResource object. |
void |
deleteProjectResources(CmsDbContext dbc,
CmsProject project)
Deletes a specified project. |
void |
deletePublishHistory(CmsDbContext dbc,
CmsUUID projectId,
int maxpublishTag)
Deletes all publish history entries with publish tags >=0 and < the specified max. |
void |
deletePublishHistoryEntry(CmsDbContext dbc,
CmsUUID publishHistoryId,
CmsPublishedResource publishedResource)
Deletes a publish history entry with publish tags >=0 and < the specified max. |
void |
deletePublishJob(CmsDbContext dbc,
CmsUUID publishHistoryId)
Deletes a publish job identified by its history id. |
void |
deletePublishList(CmsDbContext dbc,
CmsUUID publishHistoryId)
Deletes the publish list assigned to a publish job. |
void |
deleteStaticExportPublishedResource(CmsDbContext dbc,
String resourceName,
int linkType,
String linkParameter)
Deletes an entry in the published resource table. |
void |
destroy()
Destroys this driver. |
void |
fillDefaults(CmsDbContext dbc)
Fills the OpenCms database tables with default values. |
protected CmsResourceState |
fixMovedResource(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
CmsUUID publishHistoryId,
int publishTag)
Checks if the given resource (by id) is available in the online project, if there exists a resource with a different path (a moved file), then the online entry is moved to the right (new) location before publishing. |
protected String |
getParameterString(Collection<?> data)
Returns a SQL parameter string for the given data. |
CmsSqlManager |
getSqlManager()
Returns the SqlManager of this driver. |
List<CmsResource> |
getUsersPubList(CmsDbContext dbc,
CmsUUID userId)
Returns the given user's publish list. |
void |
init(CmsDbContext dbc,
CmsConfigurationManager configurationManager,
List<String> successiveDrivers,
CmsDriverManager driverManager)
Initializes the driver. |
CmsSqlManager |
initSqlManager(String classname)
Initializes the SQL manager for this driver. |
protected CmsProject |
internalCreateProject(ResultSet res)
Creates a new project from the current row of the given result set. |
protected CmsPublishList |
internalDeserializePublishList(byte[] bytes)
Builds a publish list from serialized data. |
protected CmsLogEntry |
internalReadLogEntry(ResultSet res)
Creates a new CmsLogEntry object from the given result set entry. |
protected void |
internalResetResourceState(CmsDbContext dbc,
CmsResource resource)
Resets the state to UNCHANGED for a specified resource. |
protected byte[] |
internalSerializePublishList(CmsPublishList publishList)
Serialize publish list to write it as byte array to the database. |
protected void |
internalWriteHistory(CmsDbContext dbc,
CmsResource resource,
CmsResourceState state,
List properties,
CmsUUID publishHistoryId,
int publishTag)
Writes the needed history entries. |
void |
log(CmsDbContext dbc,
List<CmsLogEntry> logEntries)
Logs the given log entries. |
protected CmsPair<String,List<I_CmsPreparedStatementParameter>> |
prepareLogConditions(CmsLogFilter filter)
Build the whole WHERE SQL statement part for the given log entry filter. |
protected void |
publishChangedFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
Set publishedResourceIds,
CmsUUID publishHistoryId,
int publishTag)
Publishes a changed file. |
protected void |
publishDeletedFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
CmsUUID publishHistoryId,
int publishTag)
Publishes a deleted file. |
void |
publishDeletedFolder(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsFolder currentFolder,
CmsUUID publishHistoryId,
int publishTag)
Publishes a deleted folder. |
void |
publishFile(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsResource offlineResource,
Set<CmsUUID> publishedContentIds,
CmsUUID publishHistoryId,
int publishTag)
Publishes a new, changed or deleted file. |
CmsFile |
publishFileContent(CmsDbContext dbc,
CmsProject offlineProject,
CmsProject onlineProject,
CmsResource offlineResource,
Set<CmsUUID> publishedResourceIds,
boolean needToUpdateContent,
int publishTag)
Publishes the content record of a file. |
void |
publishFolder(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsFolder offlineFolder,
CmsUUID publishHistoryId,
int publishTag)
Publishes a new or changed folder. |
protected void |
publishNewFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
Set publishedContentIds,
CmsUUID publishHistoryId,
int publishTag)
Publishes a new file. |
void |
publishProject(CmsDbContext dbc,
I_CmsReport report,
CmsProject onlineProject,
CmsPublishList publishList,
int publishTag)
Publishes a specified project to the online project. |
List<CmsLock> |
readLocks(CmsDbContext dbc)
Reads the
that were saved to the database in the previous run of OpenCms. |
List<CmsLogEntry> |
readLog(CmsDbContext dbc,
CmsLogFilter filter)
Reads log entries matching the given filter. |
CmsProject |
readProject(CmsDbContext dbc,
CmsUUID id)
Reads a project given the projects id. |
CmsProject |
readProject(CmsDbContext dbc,
String projectFqn)
Reads a project. |
String |
readProjectResource(CmsDbContext dbc,
CmsUUID projectId,
String resourcePath)
Reads the project resource path for a given project and resource path, to validate if a resource path for a given project already exists. |
List |
readProjectResources(CmsDbContext dbc,
CmsProject project)
Reads the project resources for a specified project. |
List |
readProjects(CmsDbContext dbc,
String ouFqn)
Returns all projects in the given organizational unit. |
List |
readProjectsForGroup(CmsDbContext dbc,
CmsGroup group)
Returns all projects, which are accessible by a group. |
List |
readProjectsForManagerGroup(CmsDbContext dbc,
CmsGroup group)
Returns all projects, which are manageable by a group. |
List |
readProjectsForResource(CmsDbContext dbc,
String rootPath)
Returns the projects of a given resource. |
List |
readProjectsForUser(CmsDbContext dbc,
CmsUser user)
Reads all projects which are owned by a specified user. |
List |
readPublishedResources(CmsDbContext dbc,
CmsUUID publishHistoryId)
Reads the resources that were published during a publish process for a given publish history ID. |
CmsPublishJobInfoBean |
readPublishJob(CmsDbContext dbc,
CmsUUID publishHistoryId)
Reads a single publish job identified by its publish history id. |
List |
readPublishJobs(CmsDbContext dbc,
long startTime,
long endTime)
Reads all publish jobs finished in the given time range. |
CmsPublishList |
readPublishList(CmsDbContext dbc,
CmsUUID publishHistoryId)
Reads the publish list assigned to a publish job. |
byte[] |
readPublishReportContents(CmsDbContext dbc,
CmsUUID publishHistoryId)
Reads the publish report assigned to a publish job. |
String |
readStaticExportPublishedResourceParameters(CmsDbContext dbc,
String rfsName)
Returns the parameters of a resource in the table of all published template resources. |
List |
readStaticExportResources(CmsDbContext dbc,
int parameterResources,
long timestamp)
Returns a list of all template resources which must be processed during a static export. |
void |
setDriverManager(CmsDriverManager driverManager)
Sets the driver manager for this driver if possible. |
void |
setSqlManager(CmsSqlManager manager)
Sets the SQL manager for this driver if possible. |
void |
unmarkProjectResources(CmsDbContext dbc,
CmsProject project)
Removes the project id from all resources within a project. |
void |
writeLocks(CmsDbContext dbc,
List<CmsLock> locks)
Writes the
to the database for reuse in the next run of OpenCms. |
void |
writeProject(CmsDbContext dbc,
CmsProject project)
Writes an already existing project. |
void |
writePublishHistory(CmsDbContext dbc,
CmsUUID publishId,
CmsPublishedResource resource)
Inserts an entry in the publish history for a published VFS resource. |
void |
writePublishJob(CmsDbContext dbc,
CmsPublishJobInfoBean publishJob)
Writes a publish job. |
void |
writePublishReport(CmsDbContext dbc,
CmsUUID publishId,
byte[] content)
Writes a publish report for a publish job. |
void |
writeStaticExportPublishedResource(CmsDbContext dbc,
String resourceName,
int linkType,
String linkParameter,
long timestamp)
Inserts an entry in the published resource table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opencms.db.I_CmsDriver |
|---|
toString |
| Field Detail |
|---|
public static final String DBC_ATTR_READ_PROJECT_FOR_RESOURCE
protected CmsDriverManager m_driverManager
protected CmsSqlManager m_sqlManager
| Constructor Detail |
|---|
public CmsProjectDriver()
| Method Detail |
|---|
public CmsProject createProject(CmsDbContext dbc,
CmsUUID id,
CmsUser owner,
CmsGroup group,
CmsGroup managergroup,
String projectFqn,
String description,
int flags,
CmsProject.CmsProjectType type)
throws CmsDataAccessException
I_CmsProjectDriver
createProject in interface I_CmsProjectDriverdbc - the current database contextid - the project idowner - the owner of the projectgroup - the group for the projectmanagergroup - the manager group for the projectprojectFqn - the name of the project to createdescription - the description for the projectflags - the flags for the projecttype - the type for the project
CmsProject instance
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.createProject(org.opencms.db.CmsDbContext, CmsUUID, org.opencms.file.CmsUser, org.opencms.file.CmsGroup, org.opencms.file.CmsGroup, java.lang.String, java.lang.String, int, CmsProject.CmsProjectType)
public void createProjectResource(CmsDbContext dbc,
CmsUUID projectId,
String resourcePath)
throws CmsDataAccessException
I_CmsProjectDriver
createProjectResource in interface I_CmsProjectDriverdbc - the current database contextprojectId - The project in which the resource will be usedresourcePath - The resource to be written to the Cms
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.createProjectResource(org.opencms.db.CmsDbContext, CmsUUID, java.lang.String)
public void createPublishJob(CmsDbContext dbc,
CmsPublishJobInfoBean publishJob)
throws CmsDataAccessException
I_CmsProjectDriver
createPublishJob in interface I_CmsProjectDriverdbc - the current database contextpublishJob - the publish job data
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.createPublishJob(org.opencms.db.CmsDbContext, org.opencms.publish.CmsPublishJobInfoBean)
public void deleteAllStaticExportPublishedResources(CmsDbContext dbc,
int linkType)
throws CmsDataAccessException
I_CmsProjectDriver
deleteAllStaticExportPublishedResources in interface I_CmsProjectDriverdbc - the current database contextlinkType - the type of resource deleted (0= non-paramter, 1=parameter)
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deleteAllStaticExportPublishedResources(org.opencms.db.CmsDbContext, int)
public void deleteLog(CmsDbContext dbc,
CmsLogFilter filter)
throws CmsDataAccessException
I_CmsProjectDriver
deleteLog in interface I_CmsProjectDriverdbc - the database contextfilter - the log entry filter
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deleteLog(org.opencms.db.CmsDbContext, org.opencms.db.log.CmsLogFilter)
public void deleteProject(CmsDbContext dbc,
CmsProject project)
throws CmsDataAccessException
I_CmsProjectDriverTherefore it deletes all files, resources and properties.
deleteProject in interface I_CmsProjectDriverdbc - the current database contextproject - the project to delete
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deleteProject(org.opencms.db.CmsDbContext, org.opencms.file.CmsProject)
public void deleteProjectResource(CmsDbContext dbc,
CmsUUID projectId,
String resourceName)
throws CmsDataAccessException
I_CmsProjectDriver
deleteProjectResource in interface I_CmsProjectDriverdbc - the current database contextprojectId - id of the project in which the resource is usedresourceName - name of the resource to be deleted from the Cms
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deleteProjectResource(org.opencms.db.CmsDbContext, CmsUUID, java.lang.String)
public void deleteProjectResources(CmsDbContext dbc,
CmsProject project)
throws CmsDataAccessException
I_CmsProjectDriver
deleteProjectResources in interface I_CmsProjectDriverdbc - the current database contextproject - the project to be deleted
CmsDataAccessException - if operation was not succesfulI_CmsProjectDriver.deleteProjectResources(org.opencms.db.CmsDbContext, org.opencms.file.CmsProject)
public void deletePublishHistory(CmsDbContext dbc,
CmsUUID projectId,
int maxpublishTag)
throws CmsDataAccessException
I_CmsProjectDriver
deletePublishHistory in interface I_CmsProjectDriverdbc - the current database contextprojectId - the ID of the current projectmaxpublishTag - entries with publish tags >=0 and < this max. publish tag get deleted
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deletePublishHistory(org.opencms.db.CmsDbContext, CmsUUID, int)
public void deletePublishHistoryEntry(CmsDbContext dbc,
CmsUUID publishHistoryId,
CmsPublishedResource publishedResource)
throws CmsDataAccessException
I_CmsProjectDriver
deletePublishHistoryEntry in interface I_CmsProjectDriverdbc - the current database contextpublishHistoryId - the id of the history to delete the entry frompublishedResource - the entry to delete
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deletePublishHistoryEntry(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID, org.opencms.db.CmsPublishedResource)
public void deletePublishJob(CmsDbContext dbc,
CmsUUID publishHistoryId)
throws CmsDataAccessException
I_CmsProjectDriver
deletePublishJob in interface I_CmsProjectDriverdbc - the current database contextpublishHistoryId - the history id identifying the publish job
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deletePublishJob(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID)
public void deletePublishList(CmsDbContext dbc,
CmsUUID publishHistoryId)
throws CmsDataAccessException
I_CmsProjectDriver
deletePublishList in interface I_CmsProjectDriverdbc - the current database contextpublishHistoryId - the history id identifying the publish job
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deletePublishList(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID)
public void deleteStaticExportPublishedResource(CmsDbContext dbc,
String resourceName,
int linkType,
String linkParameter)
throws CmsDataAccessException
I_CmsProjectDriver
deleteStaticExportPublishedResource in interface I_CmsProjectDriverdbc - the current database contextresourceName - The name of the resource to be deleted in the static exportlinkType - the type of resource deleted (0= non-paramter, 1=parameter)linkParameter - the parameters of the resource
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.deleteStaticExportPublishedResource(org.opencms.db.CmsDbContext, java.lang.String, int, java.lang.String)
public void destroy()
throws Throwable
I_CmsProjectDriver
destroy in interface I_CmsProjectDriverThrowable - if something goes wrongI_CmsProjectDriver.destroy()
public void fillDefaults(CmsDbContext dbc)
throws CmsDataAccessException
I_CmsProjectDriver
fillDefaults in interface I_CmsProjectDriverdbc - the current database context
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.fillDefaults(org.opencms.db.CmsDbContext)public CmsSqlManager getSqlManager()
I_CmsProjectDriver
getSqlManager in interface I_CmsProjectDriverI_CmsProjectDriver.getSqlManager()
public List<CmsResource> getUsersPubList(CmsDbContext dbc,
CmsUUID userId)
throws CmsDataAccessException
I_CmsProjectDriver
getUsersPubList in interface I_CmsProjectDriverdbc - the database contextuserId - the user's id
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.getUsersPubList(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID)
public void init(CmsDbContext dbc,
CmsConfigurationManager configurationManager,
List<String> successiveDrivers,
CmsDriverManager driverManager)
I_CmsDriver
init in interface I_CmsDriverdbc - the current database contextconfigurationManager - the configuration managersuccessiveDrivers - a list of successive drivers to be initializeddriverManager - the initialized OpenCms driver managerI_CmsDriver.init(CmsDbContext, CmsConfigurationManager, List, CmsDriverManager)public CmsSqlManager initSqlManager(String classname)
I_CmsProjectDriverTo obtain JDBC connections from different pools, further {online|offline|history} pool Urls have to be specified.
initSqlManager in interface I_CmsProjectDriverclassname - the classname of the SQL manager
I_CmsProjectDriver.initSqlManager(String)
public void log(CmsDbContext dbc,
List<CmsLogEntry> logEntries)
throws CmsDbSqlException
I_CmsProjectDriver
log in interface I_CmsProjectDriverdbc - the database contextlogEntries - the log entries to write
CmsDbSqlExceptionI_CmsProjectDriver.log(org.opencms.db.CmsDbContext, java.util.List)
public void publishDeletedFolder(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsFolder currentFolder,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
I_CmsProjectDriver
publishDeletedFolder in interface I_CmsProjectDriverdbc - the current database contextreport - the report to log the output tom - the number of the folder to publishn - the number of all folders to publishonlineProject - the online projectcurrentFolder - the offline folder to publishpublishHistoryId - the publish history idpublishTag - the publish tag
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.publishDeletedFolder(org.opencms.db.CmsDbContext, org.opencms.report.I_CmsReport, int, int, org.opencms.file.CmsProject, org.opencms.file.CmsFolder, org.opencms.util.CmsUUID, int)
public void publishFile(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsResource offlineResource,
Set<CmsUUID> publishedContentIds,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
I_CmsProjectDriver
publishFile in interface I_CmsProjectDriverdbc - the current database contextreport - the report to log the output tom - the number of the file to publishn - the number of all files to publishonlineProject - the online projectofflineResource - the offline file to publishpublishedContentIds - contains the UUIDs of already published content recordspublishHistoryId - the publish history idpublishTag - the publish tag
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.publishFile(org.opencms.db.CmsDbContext, org.opencms.report.I_CmsReport, int, int, org.opencms.file.CmsProject, org.opencms.file.CmsResource, java.util.Set, org.opencms.util.CmsUUID, int)
public CmsFile publishFileContent(CmsDbContext dbc,
CmsProject offlineProject,
CmsProject onlineProject,
CmsResource offlineResource,
Set<CmsUUID> publishedResourceIds,
boolean needToUpdateContent,
int publishTag)
throws CmsDataAccessException
I_CmsProjectDriverThe content record is only published unless it's UUID is not contained in publishedContentIds. The calling method has to take care about whether an existing content record has to be deleted before or not.
The intention of this method is to get overloaded in a project driver for a specific DB server to shift the binary content from the offline into the online table in a more sophisticated way than in the generic ANSI-SQL implementation of this interface.
publishFileContent in interface I_CmsProjectDriverdbc - the current database contextofflineProject - the offline project to read dataonlineProject - the online project to write dataofflineResource - the offline header of the file of which the content gets publishedpublishedResourceIds - a Set with the UUIDs of the already published content recordsneedToUpdateContent - true if the content record has to be updatedpublishTag - the publish tag
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.publishFileContent(CmsDbContext, CmsProject, CmsProject, CmsResource, Set, boolean, int)
public void publishFolder(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsFolder offlineFolder,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
I_CmsProjectDriver
publishFolder in interface I_CmsProjectDriverdbc - the current database contextreport - the report to log the output tom - the number of the folder to publishn - the number of all folders to publishonlineProject - the online projectofflineFolder - the offline folder to publishpublishHistoryId - the publish history idpublishTag - the publish tag
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.publishFolder(org.opencms.db.CmsDbContext, org.opencms.report.I_CmsReport, int, int, org.opencms.file.CmsProject, org.opencms.file.CmsFolder, org.opencms.util.CmsUUID, int)
public void publishProject(CmsDbContext dbc,
I_CmsReport report,
CmsProject onlineProject,
CmsPublishList publishList,
int publishTag)
throws CmsException
I_CmsProjectDriver
publishProject in interface I_CmsProjectDriverdbc - the current database contextreport - an I_CmsReport instance to print output messagesonlineProject - the online projectpublishList - a Cms publish listpublishTag - the publish tag
CmsException - if something goes wrongI_CmsProjectDriver.publishProject(org.opencms.db.CmsDbContext, org.opencms.report.I_CmsReport, org.opencms.file.CmsProject, org.opencms.db.CmsPublishList, int)
public List<CmsLock> readLocks(CmsDbContext dbc)
throws CmsDataAccessException
I_CmsProjectDriverList<CmsLock;>
that were saved to the database in the previous run of OpenCms.
readLocks in interface I_CmsProjectDriverdbc - the current database context
List<CmsLock;>
that were saved to the database in the previous run of OpenCms.
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readLocks(org.opencms.db.CmsDbContext)
public List<CmsLogEntry> readLog(CmsDbContext dbc,
CmsLogFilter filter)
throws CmsDataAccessException
I_CmsProjectDriver
readLog in interface I_CmsProjectDriverdbc - the database contextfilter - the log entry filter
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readLog(org.opencms.db.CmsDbContext, org.opencms.db.log.CmsLogFilter)
public CmsProject readProject(CmsDbContext dbc,
CmsUUID id)
throws CmsDataAccessException
I_CmsProjectDriver
readProject in interface I_CmsProjectDriverdbc - the current database contextid - the id of the project
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProject(org.opencms.db.CmsDbContext, CmsUUID)
public CmsProject readProject(CmsDbContext dbc,
String projectFqn)
throws CmsDataAccessException
I_CmsProjectDriver
readProject in interface I_CmsProjectDriverdbc - the current database contextprojectFqn - the name of the project
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProject(org.opencms.db.CmsDbContext, java.lang.String)
public String readProjectResource(CmsDbContext dbc,
CmsUUID projectId,
String resourcePath)
throws CmsDataAccessException
I_CmsProjectDriver
readProjectResource in interface I_CmsProjectDriverdbc - the current database contextprojectId - the ID of the project for which the resource path is readresourcePath - the project's resource path
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProjectResource(org.opencms.db.CmsDbContext, CmsUUID, java.lang.String)
public List readProjectResources(CmsDbContext dbc,
CmsProject project)
throws CmsDataAccessException
I_CmsProjectDriver
readProjectResources in interface I_CmsProjectDriverdbc - the current database contextproject - the project for which the resource path is read
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProjectResources(org.opencms.db.CmsDbContext, org.opencms.file.CmsProject)
public List readProjects(CmsDbContext dbc,
String ouFqn)
throws CmsDataAccessException
I_CmsProjectDriver
readProjects in interface I_CmsProjectDriverdbc - the current database contextouFqn - the fully qualified name of the organizational unit to get the projects for
CmsProject
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProjects(org.opencms.db.CmsDbContext, String)
public List readProjectsForGroup(CmsDbContext dbc,
CmsGroup group)
throws CmsDataAccessException
I_CmsProjectDriver
readProjectsForGroup in interface I_CmsProjectDriverdbc - the current database contextgroup - the requesting group
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProjectsForGroup(org.opencms.db.CmsDbContext, org.opencms.file.CmsGroup)
public List readProjectsForManagerGroup(CmsDbContext dbc,
CmsGroup group)
throws CmsDataAccessException
I_CmsProjectDriver
readProjectsForManagerGroup in interface I_CmsProjectDriverdbc - the current database contextgroup - The requesting group
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProjectsForManagerGroup(org.opencms.db.CmsDbContext, org.opencms.file.CmsGroup)
public List readProjectsForResource(CmsDbContext dbc,
String rootPath)
throws CmsDataAccessException
dbc - the database contextrootPath - the resource root path
CmsDataAccessException - if something goes wrong
public List readProjectsForUser(CmsDbContext dbc,
CmsUser user)
throws CmsDataAccessException
I_CmsProjectDriver
readProjectsForUser in interface I_CmsProjectDriverdbc - the current database contextuser - the user
CmsProject
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readProjectsForUser(org.opencms.db.CmsDbContext, org.opencms.file.CmsUser)
public List readPublishedResources(CmsDbContext dbc,
CmsUUID publishHistoryId)
throws CmsDataAccessException
I_CmsProjectDriver
readPublishedResources in interface I_CmsProjectDriverdbc - the current database contextpublishHistoryId - unique int ID to identify the publish process in the publish history
CmsPublishedResource objects
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readPublishedResources(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID)
public CmsPublishJobInfoBean readPublishJob(CmsDbContext dbc,
CmsUUID publishHistoryId)
throws CmsDataAccessException
I_CmsProjectDriver
readPublishJob in interface I_CmsProjectDriverdbc - the current database contextpublishHistoryId - unique id to identify the publish job in the publish history
CmsPublishJobInfoBean
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readPublishJob(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID)
public List readPublishJobs(CmsDbContext dbc,
long startTime,
long endTime)
throws CmsDataAccessException
I_CmsProjectDriver
If (0L, 0L) is passed as time range, all pending jobs are returned.
readPublishJobs in interface I_CmsProjectDriverdbc - the current database contextstartTime - the start of the time range for finish timeendTime - the end of the time range for finish time
CmsPublishJobInfoBean
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readPublishJobs(org.opencms.db.CmsDbContext, long, long)
public CmsPublishList readPublishList(CmsDbContext dbc,
CmsUUID publishHistoryId)
throws CmsDataAccessException
I_CmsProjectDriver
readPublishList in interface I_CmsProjectDriverdbc - the current database contextpublishHistoryId - the history id identifying the publish job
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readPublishList(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID)
public byte[] readPublishReportContents(CmsDbContext dbc,
CmsUUID publishHistoryId)
throws CmsDataAccessException
I_CmsProjectDriver
readPublishReportContents in interface I_CmsProjectDriverdbc - the current database contextpublishHistoryId - the history id identifying the publish job
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readPublishReportContents(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID)
public String readStaticExportPublishedResourceParameters(CmsDbContext dbc,
String rfsName)
throws CmsDataAccessException
I_CmsProjectDriver
readStaticExportPublishedResourceParameters in interface I_CmsProjectDriverdbc - the current database contextrfsName - the rfs name of the resource
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readStaticExportPublishedResourceParameters(org.opencms.db.CmsDbContext, java.lang.String)
public List readStaticExportResources(CmsDbContext dbc,
int parameterResources,
long timestamp)
throws CmsDataAccessException
I_CmsProjectDriver
readStaticExportResources in interface I_CmsProjectDriverdbc - the current database contextparameterResources - flag for reading resources with parameters (1) or without (0)timestamp - the time stamp information
String objects
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.readStaticExportResources(org.opencms.db.CmsDbContext, int, long)public void setDriverManager(CmsDriverManager driverManager)
I_CmsProjectDriver
setDriverManager in interface I_CmsProjectDriverdriverManager - the new driver managerI_CmsProjectDriver.setDriverManager(org.opencms.db.CmsDriverManager)public void setSqlManager(CmsSqlManager manager)
I_CmsProjectDriver
setSqlManager in interface I_CmsProjectDrivermanager - the new SQL managerI_CmsProjectDriver.setSqlManager(org.opencms.db.CmsSqlManager)
public void unmarkProjectResources(CmsDbContext dbc,
CmsProject project)
throws CmsDataAccessException
I_CmsProjectDriverThis must be done when a project will deleted
unmarkProjectResources in interface I_CmsProjectDriverdbc - the current database contextproject - the project to delete
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.unmarkProjectResources(org.opencms.db.CmsDbContext, org.opencms.file.CmsProject)
public void writeLocks(CmsDbContext dbc,
List<CmsLock> locks)
throws CmsDataAccessException
I_CmsProjectDriverList<CmsLock;>
to the database for reuse in the next run of OpenCms.This method must only be called at startup or the in-memory locking will overwritten.
writeLocks in interface I_CmsProjectDriverdbc - the current database contextlocks - the List<CmsLock;> that
currently exist in OpenCms (CmsLockManager)
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.writeLocks(org.opencms.db.CmsDbContext, java.util.List)
public void writeProject(CmsDbContext dbc,
CmsProject project)
throws CmsDataAccessException
I_CmsProjectDriver
The project id has to be a valid OpenCms project id.
The project with the given id will be completely overriden
by the given data.
writeProject in interface I_CmsProjectDriverdbc - the current database contextproject - the project that should be written
CmsDataAccessException - if operation was not successfulI_CmsProjectDriver.writeProject(org.opencms.db.CmsDbContext, org.opencms.file.CmsProject)
public void writePublishHistory(CmsDbContext dbc,
CmsUUID publishId,
CmsPublishedResource resource)
throws CmsDataAccessException
I_CmsProjectDriver
writePublishHistory in interface I_CmsProjectDriverdbc - the current database contextpublishId - the ID of the current publishing processresource - the state of the resource *before* it was published
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.writePublishHistory(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID, org.opencms.db.CmsPublishedResource)
public void writePublishJob(CmsDbContext dbc,
CmsPublishJobInfoBean publishJob)
throws CmsDataAccessException
I_CmsProjectDriver
writePublishJob in interface I_CmsProjectDriverdbc - the current database contextpublishJob - the publish job to write
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.writePublishJob(org.opencms.db.CmsDbContext, org.opencms.publish.CmsPublishJobInfoBean)
public void writePublishReport(CmsDbContext dbc,
CmsUUID publishId,
byte[] content)
throws CmsDataAccessException
I_CmsProjectDriver
writePublishReport in interface I_CmsProjectDriverdbc - the current database contextpublishId - the ID of the current publishing processcontent - the report output
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.writePublishReport(org.opencms.db.CmsDbContext, org.opencms.util.CmsUUID, byte[])
public void writeStaticExportPublishedResource(CmsDbContext dbc,
String resourceName,
int linkType,
String linkParameter,
long timestamp)
throws CmsDataAccessException
I_CmsProjectDriverThis is done during static export.
writeStaticExportPublishedResource in interface I_CmsProjectDriverdbc - the current database contextresourceName - The name of the resource to be added to the static exportlinkType - the type of resource exported (0= non-paramter, 1=parameter)linkParameter - the parameters added to the resourcetimestamp - a timestamp for writing the data into the db
CmsDataAccessException - if something goes wrongI_CmsProjectDriver.writeStaticExportPublishedResource(org.opencms.db.CmsDbContext, java.lang.String, int, java.lang.String, long)
protected CmsPublishJobInfoBean createPublishJobInfoBean(ResultSet res)
throws SQLException
CmsPublishJobInfoBean from a result set.
res - the result set
CmsPublishJobInfoBean
SQLException - if something goes wrong
protected CmsResourceState fixMovedResource(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
dbc - the db contextonlineProject - the online projectofflineResource - the offline resource to checkpublishHistoryId - the publish history idpublishTag - the publish tag
true if the resource has actually been moved
CmsDataAccessException - if something goes wrongprotected String getParameterString(Collection<?> data)
data - the data
protected CmsProject internalCreateProject(ResultSet res)
throws SQLException
res - the result set
SQLException - is something goes wrong
protected CmsPublishList internalDeserializePublishList(byte[] bytes)
throws IOException,
ClassNotFoundException
bytes - the byte array containing the serailized data for the publish list
IOException - if deserialization fails
ClassNotFoundException - if deserialization fails
protected CmsLogEntry internalReadLogEntry(ResultSet res)
throws SQLException
CmsLogEntry object from the given result set entry.
res - the result set
CmsLogEntry object
SQLException - if something goes wrong
protected void internalResetResourceState(CmsDbContext dbc,
CmsResource resource)
throws CmsDataAccessException
dbc - the current database contextresource - the Cms resource
CmsDataAccessException - if something goes wrong
protected byte[] internalSerializePublishList(CmsPublishList publishList)
throws IOException
publishList - the publish list
IOException - if something goes wrong
protected void internalWriteHistory(CmsDbContext dbc,
CmsResource resource,
CmsResourceState state,
List properties,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
dbc - the current database contextresource - the offline resourcestate - the state to store in the publish history entryproperties - the offline propertiespublishHistoryId - the current publish process idpublishTag - the current publish process tag
CmsDataAccessException - if something goes wrongprotected CmsPair<String,List<I_CmsPreparedStatementParameter>> prepareLogConditions(CmsLogFilter filter)
filter - the filter
protected void publishChangedFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
Set publishedResourceIds,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
dbc - the current database contextonlineProject - the online projectofflineResource - the resource to publishpublishedResourceIds - contains the UUIDs of already published content recordspublishHistoryId - the publish history idpublishTag - the publish tag
CmsDataAccessException - is something goes wrong
protected void publishDeletedFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
dbc - the current database contextonlineProject - the online projectofflineResource - the resource to publishpublishHistoryId - the publish history idpublishTag - the publish tag
CmsDataAccessException - is something goes wrong
protected void publishNewFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
Set publishedContentIds,
CmsUUID publishHistoryId,
int publishTag)
throws CmsDataAccessException
dbc - the current database contextonlineProject - the online projectofflineResource - the resource to publishpublishedContentIds - contains the UUIDs of already published content recordspublishHistoryId - the publish history idpublishTag - the publish tag
CmsDataAccessException - is something goes wrong
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||