|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I_CmsProjectDriver
Definitions of all required project driver methods.
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 |
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 |
destroy()
Destroys this driver. |
void |
fillDefaults(CmsDbContext dbc)
Fills the OpenCms database tables with default values. |
CmsSqlManager |
getSqlManager()
Returns the SqlManager of this driver. |
CmsSqlManager |
initSqlManager(java.lang.String classname)
Initializes the SQL manager for this driver. |
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 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 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 |
readLocks(CmsDbContext dbc)
Reads the
that were saved to the database in the previous run of OpenCms. |
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 |
readProjectResources(CmsDbContext dbc,
CmsProject project)
Reads the project resources for a specified project. |
java.util.List |
readProjects(CmsDbContext dbc,
java.lang.String ouFqn)
Returns all projects in the given organizational unit. |
java.util.List |
readProjectsForGroup(CmsDbContext dbc,
CmsGroup group)
Returns all projects, which are accessible by a group. |
java.util.List |
readProjectsForManagerGroup(CmsDbContext dbc,
CmsGroup group)
Returns all projects, which are manageable by a group. |
java.util.List |
readProjectsForUser(CmsDbContext dbc,
CmsUser user)
Reads all projects which are owned by a specified user. |
java.util.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. |
java.util.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. |
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 |
readStaticExportResources(CmsDbContext dbc,
int parameterResources,
long timestamp)
Returns a list of all template resources which must be processed during a static export. |
void |
unmarkProjectResources(CmsDbContext dbc,
CmsProject project)
Removes the project id from all resources within a project. |
void |
writeLocks(CmsDbContext dbc,
java.util.List 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. |
Field Detail |
---|
static final java.lang.String SETUP_PROJECT_NAME
static final int DRIVER_TYPE_ID
static final java.lang.String TEMP_FILE_PROJECT_NAME
Method Detail |
---|
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 project
CmsProject
instance
CmsDataAccessException
- 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 Cms
CmsDataAccessException
- if something goes wrongvoid createPublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsDataAccessException
dbc
- the current database contextpublishJob
- the publish job data
CmsDataAccessException
- 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 deleteProject(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
Therefore it deletes all files, resources and properties.
dbc
- the current database contextproject
- the project to delete
CmsDataAccessException
- 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 Cms
CmsDataAccessException
- if something goes wrongvoid deleteProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
dbc
- the current database contextproject
- the project to be deleted
CmsDataAccessException
- 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 deleted
CmsDataAccessException
- 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 delete
CmsDataAccessException
- if something goes wrongvoid deletePublishJob(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish job
CmsDataAccessException
- if something goes wrongvoid deletePublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish job
CmsDataAccessException
- 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 resource
CmsDataAccessException
- 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 context
CmsDataAccessException
- if something goes wrongCmsSqlManager getSqlManager()
CmsSqlManager 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 manager
void 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 tag
CmsDataAccessException
- if something goes wrongvoid publishFile(CmsDbContext dbc, I_CmsReport report, int m, int n, CmsProject onlineProject, CmsResource offlineResource, java.util.Set 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 tag
CmsDataAccessException
- if something goes wrongCmsFile publishFileContent(CmsDbContext dbc, CmsProject offlineProject, CmsProject onlineProject, CmsResource offlineFileHeader, java.util.Set 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 tag
CmsDataAccessException
- 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 tag
CmsDataAccessException
- 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 tag
CmsException
- if something goes wrongjava.util.List readLocks(CmsDbContext dbc) throws CmsDataAccessException
List
<CmsLock
;>
that were saved to the database in the previous run of OpenCms.
dbc
- the current database context
List
<CmsLock
;>
that were saved to the database in the previous run of OpenCms.
CmsDataAccessException
- if something goes wrongCmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException
dbc
- the current database contextid
- the id of the project
CmsDataAccessException
- if something goes wrongCmsProject readProject(CmsDbContext dbc, java.lang.String name) throws CmsDataAccessException
dbc
- the current database contextname
- the name of the project
CmsDataAccessException
- 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 path
CmsDataAccessException
- if something goes wrongjava.util.List readProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
dbc
- the current database contextproject
- the project for which the resource path is read
CmsDataAccessException
- if something goes wrongjava.util.List 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 for
CmsProject
CmsDataAccessException
- if something goes wrongjava.util.List readProjectsForGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException
dbc
- the current database contextgroup
- the requesting group
CmsDataAccessException
- if something goes wrongjava.util.List readProjectsForManagerGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException
dbc
- the current database contextgroup
- The requesting group
CmsDataAccessException
- if something goes wrongjava.util.List readProjectsForUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException
dbc
- the current database contextuser
- the user
CmsProject
CmsDataAccessException
- 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 history
CmsPublishJobInfoBean
CmsDataAccessException
- if something goes wrongjava.util.List 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 time
CmsPublishJobInfoBean
CmsDataAccessException
- if something goes wrongCmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish job
CmsDataAccessException
- if something goes wrongbyte[] readPublishReportContents(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- the history id identifying the publish job
CmsDataAccessException
- if something goes wrongjava.util.List readPublishedResources(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
dbc
- the current database contextpublishHistoryId
- unique int ID to identify the publish process in the publish history
CmsPublishedResource
objects
CmsDataAccessException
- 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 resource
CmsDataAccessException
- if something goes wrongjava.util.List 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 timestamp information
String
objects
CmsDataAccessException
- if something goes wrongvoid unmarkProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
This must be done when a project will deleted
dbc
- the current database contextproject
- the project to delete
CmsDataAccessException
- if something goes wrongvoid writeLocks(CmsDbContext dbc, java.util.List 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 written
CmsDataAccessException
- 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 published
CmsDataAccessException
- if something goes wrongvoid writePublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsDataAccessException
dbc
- the current database contextpublishJob
- the publish job to write
CmsDataAccessException
- 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 output
CmsDataAccessException
- 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 db
CmsDataAccessException
- if something goes wrong
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |