public interface I_CmsProjectDriver
限定符和类型 | 字段和说明 |
---|---|
static int |
DRIVER_TYPE_ID
The type ID to identify project driver implementations.
|
static java.lang.String |
SETUP_PROJECT_NAME
Name of the setup project.
|
static java.lang.String |
TEMP_FILE_PROJECT_NAME
The name of the temp file project.
|
限定符和类型 | 方法和说明 |
---|---|
CmsProject |
createProject(CmsDbContext dbc,
CmsUUID id,
CmsUser owner,
CmsGroup group,
CmsGroup managergroup,
java.lang.String name,
java.lang.String description,
int flags,
CmsProject.CmsProjectType type)
Creates a new project.
|
void |
createProjectResource(CmsDbContext dbc,
CmsUUID projectId,
java.lang.String resourceName)
Creates a new projectResource from a given CmsResource object.
|
void |
createPublishJob(CmsDbContext dbc,
CmsPublishJobInfoBean publishJob)
Inserts an entry for a publish job .
|
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,
java.lang.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. publish tag.
|
void |
deletePublishHistoryEntry(CmsDbContext dbc,
CmsUUID publishHistoryId,
CmsPublishedResource publishResource)
Deletes a publish history entry with publish tags >=0 and < the specified max. publish tag.
|
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,
java.lang.String resourceName,
int linkType,
java.lang.String linkParameter)
Deletes an entry in the published resource table.
|
void |
deleteUserPublishListEntries(CmsDbContext dbc,
java.util.List<CmsUserPublishListEntry> publishListDeletions)
Deletes multiple publish list entries from the database.
|
void |
destroy()
Destroys this driver.
|
void |
fillDefaults(CmsDbContext dbc)
Fills the OpenCms database tables with default values.
|
CmsSqlManager |
getSqlManager()
Returns the SqlManager of this driver.
|
java.util.List<CmsResource> |
getUsersPubList(CmsDbContext dbc,
CmsUUID userId)
Returns the given user's publish list.
|
CmsSqlManager |
initSqlManager(java.lang.String classname)
Initializes the SQL manager for this driver.
|
void |
log(CmsDbContext dbc,
java.util.List<CmsLogEntry> logEntries)
Logs the given log entries.
|
void |
publishDeletedFolder(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsFolder offlineFolder,
CmsUUID publishHistoryId,
int publishTag)
Publishes a deleted folder.
|
void |
publishFile(CmsDbContext dbc,
I_CmsReport report,
int m,
int n,
CmsProject onlineProject,
CmsResource offlineResource,
java.util.Set<CmsUUID> publishedContentIds,
CmsUUID publishHistoryId,
int publishTag)
Publishes a new, changed or deleted file.
|
CmsFile |
publishFileContent(CmsDbContext dbc,
CmsProject offlineProject,
CmsProject onlineProject,
CmsResource offlineFileHeader,
java.util.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 currentFolder,
CmsUUID publishHistoryId,
int publishTag)
Publishes a new or changed folder.
|
void |
publishProject(CmsDbContext dbc,
I_CmsReport report,
CmsProject onlineProject,
CmsPublishList publishList,
int publishTag)
Publishes a specified project to the online project.
|
java.util.List<CmsLock> |
readLocks(CmsDbContext dbc)
Reads the
that were saved to the database in the previous run of OpenCms. |
java.util.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,
java.lang.String name)
Reads a project.
|
java.lang.String |
readProjectResource(CmsDbContext dbc,
CmsUUID projectId,
java.lang.String resourcename)
Reads the project resource path for a given project and resource path,
to validate if a resource path for a given project already exists.
|
java.util.List<java.lang.String> |
readProjectResources(CmsDbContext dbc,
CmsProject project)
Reads the project resources for a specified project.
|
java.util.List<CmsProject> |
readProjects(CmsDbContext dbc,
java.lang.String ouFqn)
Returns all projects in the given organizational unit.
|
java.util.List<CmsProject> |
readProjectsForGroup(CmsDbContext dbc,
CmsGroup group)
Returns all projects, which are accessible by a group.
|
java.util.List<CmsProject> |
readProjectsForManagerGroup(CmsDbContext dbc,
CmsGroup group)
Returns all projects, which are manageable by a group.
|
java.util.List<CmsProject> |
readProjectsForUser(CmsDbContext dbc,
CmsUser user)
Reads all projects which are owned by a specified user.
|
java.util.List<CmsPublishedResource> |
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.
|
java.util.List<CmsPublishJobInfoBean> |
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.
|
java.lang.String |
readStaticExportPublishedResourceParameters(CmsDbContext dbc,
java.lang.String rfsName)
Returns the parameters of a resource in the table of all published template resources.
|
java.util.List<java.lang.String> |
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 sqlManager)
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,
java.util.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,
java.lang.String resourceName,
int linkType,
java.lang.String linkParameter,
long timestamp)
Inserts an entry in the published resource table.
|
void |
writeUserPublishListEntries(CmsDbContext dbc,
java.util.List<CmsUserPublishListEntry> publishListAdditions)
Writes multiple user publish list entries to the database.
|
static final int DRIVER_TYPE_ID
static final java.lang.String SETUP_PROJECT_NAME
static final java.lang.String TEMP_FILE_PROJECT_NAME
CmsProject createProject(CmsDbContext dbc, CmsUUID id, CmsUser owner, CmsGroup group, CmsGroup managergroup, java.lang.String name, java.lang.String description, int flags, CmsProject.CmsProjectType type) throws CmsDataAccessException
dbc
- the current database contextid
- the project idowner
- the owner of the projectgroup
- the group for the projectmanagergroup
- the manager group for the projectname
- the name of the project to createdescription
- the description for the projectflags
- the flags for the projecttype
- the type for the projectCmsProject
instanceCmsDataAccessException
- if something goes wrongvoid createProjectResource(CmsDbContext dbc, CmsUUID projectId, java.lang.String resourceName) throws CmsDataAccessException
dbc
- the current database contextprojectId
- The project in which the resource will be usedresourceName
- The resource to be written to the CmsCmsDataAccessException
- if something goes wrongvoid createPublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsDataAccessException
dbc
- the current database contextpublishJob
- the publish job dataCmsDataAccessException
- if something goes wrongvoid deleteAllStaticExportPublishedResources(CmsDbContext dbc, int linkType) throws CmsDataAccessException
dbc
- the current database contextlinkType
- the type of resource deleted (0= non-paramter, 1=parameter)CmsDataAccessException
- if something goes wrongvoid deleteLog(CmsDbContext dbc, CmsLogFilter filter) throws CmsDataAccessException
dbc
- the database contextfilter
- the log entry filterCmsDataAccessException
- if something goes wrongvoid deleteProject(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
Therefore it deletes all files, resources and properties.
dbc
- the current database contextproject
- the project to deleteCmsDataAccessException
- if something goes wrongvoid deleteProjectResource(CmsDbContext dbc, CmsUUID projectId, java.lang.String resourceName) throws CmsDataAccessException
dbc
- the current database contextprojectId
- id of the project in which the resource is usedresourceName
- name of the resource to be deleted from the CmsCmsDataAccessException
- if something goes wrongvoid deleteProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
dbc
- the current database contextproject
- the project to be deletedCmsDataAccessException
- if operation was not succesfulvoid deletePublishHistory(CmsDbContext dbc, CmsUUID projectId, int maxPublishTag) throws CmsDataAccessException
dbc
- the current database contextprojectId
- the ID of the current projectmaxPublishTag
- entries with publish tags >=0 and < this max. publish tag get deletedCmsDataAccessException
- if something goes wrongvoid deletePublishHistoryEntry(CmsDbContext dbc, CmsUUID publishHistoryId, CmsPublishedResource publishResource) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the id of the history to delete the entry frompublishResource
- the entry to deleteCmsDataAccessException
- if something goes wrongvoid deletePublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish jobCmsDataAccessException
- if something goes wrongvoid deletePublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish jobCmsDataAccessException
- if something goes wrongvoid deleteStaticExportPublishedResource(CmsDbContext dbc, java.lang.String resourceName, int linkType, java.lang.String linkParameter) throws CmsDataAccessException
dbc
- 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 resourceCmsDataAccessException
- if something goes wrongvoid deleteUserPublishListEntries(CmsDbContext dbc, java.util.List<CmsUserPublishListEntry> publishListDeletions) throws CmsDataAccessException
dbc
- the current database contextpublishListDeletions
- the publish list entries to remove from the databaseCmsDataAccessException
- if something goes wrongvoid destroy() throws java.lang.Throwable
java.lang.Throwable
- if something goes wrongvoid fillDefaults(CmsDbContext dbc) throws CmsDataAccessException
dbc
- the current database contextCmsDataAccessException
- if something goes wrongCmsSqlManager getSqlManager()
java.util.List<CmsResource> getUsersPubList(CmsDbContext dbc, CmsUUID userId) throws CmsDataAccessException
dbc
- the database contextuserId
- the user's idCmsDataAccessException
- if something goes wrongCmsSqlManager initSqlManager(java.lang.String classname)
To obtain JDBC connections from different pools, further {online|offline|history} pool Urls have to be specified.
classname
- the classname of the SQL managervoid log(CmsDbContext dbc, java.util.List<CmsLogEntry> logEntries) throws CmsDataAccessException
dbc
- the database contextlogEntries
- the log entries to writeCmsDataAccessException
- if something goes wrongvoid publishDeletedFolder(CmsDbContext dbc, I_CmsReport report, int m, int n, CmsProject onlineProject, CmsFolder offlineFolder, CmsUUID publishHistoryId, int publishTag) throws CmsDataAccessException
dbc
- 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 tagCmsDataAccessException
- if something goes wrongvoid publishFile(CmsDbContext dbc, I_CmsReport report, int m, int n, CmsProject onlineProject, CmsResource offlineResource, java.util.Set<CmsUUID> publishedContentIds, CmsUUID publishHistoryId, int publishTag) throws CmsDataAccessException
dbc
- 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 tagCmsDataAccessException
- if something goes wrongCmsFile publishFileContent(CmsDbContext dbc, CmsProject offlineProject, CmsProject onlineProject, CmsResource offlineFileHeader, java.util.Set<CmsUUID> publishedResourceIds, boolean needToUpdateContent, int publishTag) throws CmsDataAccessException
The 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.
dbc
- the current database contextofflineProject
- the offline project to read dataonlineProject
- the online project to write dataofflineFileHeader
- 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 tagCmsDataAccessException
- if something goes wrongvoid publishFolder(CmsDbContext dbc, I_CmsReport report, int m, int n, CmsProject onlineProject, CmsFolder currentFolder, CmsUUID publishHistoryId, int publishTag) throws CmsDataAccessException
dbc
- 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 tagCmsDataAccessException
- if something goes wrongvoid publishProject(CmsDbContext dbc, I_CmsReport report, CmsProject onlineProject, CmsPublishList publishList, int publishTag) throws CmsException
dbc
- the current database contextreport
- an I_CmsReport instance to print output messagesonlineProject
- the online projectpublishList
- a Cms publish listpublishTag
- the publish tagCmsException
- if something goes wrongjava.util.List<CmsLock> readLocks(CmsDbContext dbc) throws CmsDataAccessException
List
<CmsLock
;>
that were saved to the database in the previous run of OpenCms.dbc
- the current database contextList
<CmsLock
;>
that were saved to the database in the previous run of OpenCms.CmsDataAccessException
- if something goes wrongjava.util.List<CmsLogEntry> readLog(CmsDbContext dbc, CmsLogFilter filter) throws CmsDataAccessException
dbc
- the database contextfilter
- the log entry filterCmsDataAccessException
- if something goes wrongCmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException
dbc
- the current database contextid
- the id of the projectCmsDataAccessException
- if something goes wrongCmsProject readProject(CmsDbContext dbc, java.lang.String name) throws CmsDataAccessException
dbc
- the current database contextname
- the name of the projectCmsDataAccessException
- if something goes wrongjava.lang.String readProjectResource(CmsDbContext dbc, CmsUUID projectId, java.lang.String resourcename) throws CmsDataAccessException
dbc
- the current database contextprojectId
- the ID of the project for which the resource path is readresourcename
- the project's resource pathCmsDataAccessException
- if something goes wrongjava.util.List<java.lang.String> readProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
dbc
- the current database contextproject
- the project for which the resource path is readCmsDataAccessException
- if something goes wrongjava.util.List<CmsProject> readProjects(CmsDbContext dbc, java.lang.String ouFqn) throws CmsDataAccessException
dbc
- the current database contextouFqn
- the fully qualified name of the organizational unit to get the projects forCmsProject
CmsDataAccessException
- if something goes wrongjava.util.List<CmsProject> readProjectsForGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException
dbc
- the current database contextgroup
- the requesting groupCmsDataAccessException
- if something goes wrongjava.util.List<CmsProject> readProjectsForManagerGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException
dbc
- the current database contextgroup
- The requesting groupCmsDataAccessException
- if something goes wrongjava.util.List<CmsProject> readProjectsForUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException
dbc
- the current database contextuser
- the userCmsProject
CmsDataAccessException
- if something goes wrongjava.util.List<CmsPublishedResource> readPublishedResources(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- unique int ID to identify the publish process in the publish historyCmsPublishedResource
objectsCmsDataAccessException
- if something goes wrongCmsPublishJobInfoBean readPublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- unique id to identify the publish job in the publish historyCmsPublishJobInfoBean
CmsDataAccessException
- if something goes wrongjava.util.List<CmsPublishJobInfoBean> readPublishJobs(CmsDbContext dbc, long startTime, long endTime) throws CmsDataAccessException
If (0L, 0L)
is passed as time range, all pending jobs are returned.
dbc
- the current database contextstartTime
- the start of the time range for finish timeendTime
- the end of the time range for finish timeCmsPublishJobInfoBean
CmsDataAccessException
- if something goes wrongCmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish jobCmsDataAccessException
- if something goes wrongbyte[] readPublishReportContents(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish jobCmsDataAccessException
- if something goes wrongjava.lang.String readStaticExportPublishedResourceParameters(CmsDbContext dbc, java.lang.String rfsName) throws CmsDataAccessException
dbc
- the current database contextrfsName
- the rfs name of the resourceCmsDataAccessException
- if something goes wrongjava.util.List<java.lang.String> readStaticExportResources(CmsDbContext dbc, int parameterResources, long timestamp) throws CmsDataAccessException
dbc
- the current database contextparameterResources
- flag for reading resources with parameters (1) or without (0)timestamp
- the time stamp informationString
objectsCmsDataAccessException
- if something goes wrongvoid setDriverManager(CmsDriverManager driverManager)
driverManager
- the new driver managervoid setSqlManager(CmsSqlManager sqlManager)
sqlManager
- the new SQL managervoid unmarkProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
This must be done when a project will deleted
dbc
- the current database contextproject
- the project to deleteCmsDataAccessException
- if something goes wrongvoid writeLocks(CmsDbContext dbc, java.util.List<CmsLock> locks) throws CmsDataAccessException
List
<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.
dbc
- the current database contextlocks
- the List
<CmsLock
;>
that
currently exist in OpenCms (CmsLockManager
)CmsDataAccessException
- if something goes wrongvoid writeProject(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
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.
dbc
- the current database contextproject
- the project that should be writtenCmsDataAccessException
- if operation was not successfulvoid writePublishHistory(CmsDbContext dbc, CmsUUID publishId, CmsPublishedResource resource) throws CmsDataAccessException
dbc
- the current database contextpublishId
- the ID of the current publishing processresource
- the state of the resource *before* it was publishedCmsDataAccessException
- if something goes wrongvoid writePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsDataAccessException
dbc
- the current database contextpublishJob
- the publish job to writeCmsDataAccessException
- if something goes wrongvoid writePublishReport(CmsDbContext dbc, CmsUUID publishId, byte[] content) throws CmsDataAccessException
dbc
- the current database contextpublishId
- the ID of the current publishing processcontent
- the report outputCmsDataAccessException
- if something goes wrongvoid writeStaticExportPublishedResource(CmsDbContext dbc, java.lang.String resourceName, int linkType, java.lang.String linkParameter, long timestamp) throws CmsDataAccessException
This is done during static export.
dbc
- 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 dbCmsDataAccessException
- if something goes wrongvoid writeUserPublishListEntries(CmsDbContext dbc, java.util.List<CmsUserPublishListEntry> publishListAdditions) throws CmsDataAccessException
dbc
- the current database contextpublishListAdditions
- the user publish list entries to writeCmsDataAccessException
- if something goes wrong