|
||||||
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 java.lang.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,
java.lang.String projectFqn,
java.lang.String description,
int flags,
CmsProject.CmsProjectType type)
Creates a new project. |
void |
createProjectResource(CmsDbContext dbc,
CmsUUID projectId,
java.lang.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(java.sql.ResultSet res)
Creates a CmsPublishJobInfoBean from a result set. |
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 publishedResource)
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. |
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. |
CmsSqlManager |
getSqlManager()
Returns the SqlManager of this driver. |
void |
init(CmsDbContext dbc,
CmsConfigurationManager configurationManager,
java.util.List successiveDrivers,
CmsDriverManager driverManager)
Initializes the driver. |
CmsSqlManager |
initSqlManager(java.lang.String classname)
Initializes the SQL manager for this driver. |
protected CmsProject |
internalCreateProject(java.sql.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 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,
java.util.List properties,
CmsUUID publishHistoryId,
int publishTag)
Writes the needed history entries. |
protected void |
publishChangedFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
java.util.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,
java.util.Set publishedContentIds,
CmsUUID publishHistoryId,
int publishTag)
Publishes a new, changed or deleted file. |
CmsFile |
publishFileContent(CmsDbContext dbc,
CmsProject offlineProject,
CmsProject onlineProject,
CmsResource offlineResource,
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 offlineFolder,
CmsUUID publishHistoryId,
int publishTag)
Publishes a new or changed folder. |
protected void |
publishNewFile(CmsDbContext dbc,
CmsProject onlineProject,
CmsResource offlineResource,
java.util.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. |
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 projectFqn)
Reads a project. |
java.lang.String |
readProjectResource(CmsDbContext dbc,
CmsUUID projectId,
java.lang.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. |
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 |
readProjectsForResource(CmsDbContext dbc,
java.lang.String rootPath)
Returns the projects of a given resource. |
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 |
setDriverManager(CmsDriverManager driverManager)
Sets the driver manager for this driver. |
void |
setSqlManager(CmsSqlManager manager)
Sets the SQL manager of this driver. |
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. |
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 java.lang.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, java.lang.String projectFqn, java.lang.String description, int flags, CmsProject.CmsProjectType type) throws CmsDataAccessException
I_CmsProjectDriver
createProject
in interface I_CmsProjectDriver
dbc
- 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, java.lang.String resourcePath) throws CmsDataAccessException
I_CmsProjectDriver
createProjectResource
in interface I_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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 deleteProject(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
I_CmsProjectDriver
Therefore it deletes all files, resources and properties.
deleteProject
in interface I_CmsProjectDriver
dbc
- 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, java.lang.String resourceName) throws CmsDataAccessException
I_CmsProjectDriver
deleteProjectResource
in interface I_CmsProjectDriver
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 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_CmsProjectDriver
dbc
- 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_CmsProjectDriver
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 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_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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, java.lang.String resourceName, int linkType, java.lang.String linkParameter) throws CmsDataAccessException
I_CmsProjectDriver
deleteStaticExportPublishedResource
in interface I_CmsProjectDriver
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 wrongI_CmsProjectDriver.deleteStaticExportPublishedResource(org.opencms.db.CmsDbContext, java.lang.String, int, java.lang.String)
public void destroy() throws java.lang.Throwable
I_CmsProjectDriver
destroy
in interface I_CmsProjectDriver
java.lang.Throwable
- if something goes wrongI_CmsProjectDriver.destroy()
public void fillDefaults(CmsDbContext dbc) throws CmsDataAccessException
I_CmsProjectDriver
fillDefaults
in interface I_CmsProjectDriver
dbc
- the current database context
CmsDataAccessException
- if something goes wrongI_CmsProjectDriver.fillDefaults(org.opencms.db.CmsDbContext)
public CmsSqlManager getSqlManager()
I_CmsProjectDriver
getSqlManager
in interface I_CmsProjectDriver
I_CmsProjectDriver.getSqlManager()
public void init(CmsDbContext dbc, CmsConfigurationManager configurationManager, java.util.List successiveDrivers, CmsDriverManager driverManager)
I_CmsDriver
init
in interface I_CmsDriver
dbc
- the current database contextconfigurationManager
- the configuration managersuccessiveDrivers
- a list of successive drivers to be initializeddriverManager
- the initialized OpenCms driver managerI_CmsDriver.init(org.opencms.db.CmsDbContext, org.opencms.configuration.CmsConfigurationManager, java.util.List, org.opencms.db.CmsDriverManager)
public CmsSqlManager initSqlManager(java.lang.String classname)
I_CmsProjectDriver
To obtain JDBC connections from different pools, further {online|offline|history} pool Urls have to be specified.
initSqlManager
in interface I_CmsProjectDriver
classname
- the classname of the SQL manager
I_CmsProjectDriver.initSqlManager(String)
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_CmsProjectDriver
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 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, java.util.Set publishedContentIds, CmsUUID publishHistoryId, int publishTag) throws CmsDataAccessException
I_CmsProjectDriver
publishFile
in interface I_CmsProjectDriver
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 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, java.util.Set publishedResourceIds, boolean needToUpdateContent, int publishTag) throws CmsDataAccessException
I_CmsProjectDriver
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.
publishFileContent
in interface I_CmsProjectDriver
dbc
- 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_CmsProjectDriver
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 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_CmsProjectDriver
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 wrongI_CmsProjectDriver.publishProject(org.opencms.db.CmsDbContext, org.opencms.report.I_CmsReport, org.opencms.file.CmsProject, org.opencms.db.CmsPublishList, int)
public java.util.List readLocks(CmsDbContext dbc) throws CmsDataAccessException
I_CmsProjectDriver
List
<CmsLock
;>
that were saved to the database in the previous run of OpenCms.
readLocks
in interface I_CmsProjectDriver
dbc
- 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 CmsProject readProject(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException
I_CmsProjectDriver
readProject
in interface I_CmsProjectDriver
dbc
- 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, java.lang.String projectFqn) throws CmsDataAccessException
I_CmsProjectDriver
readProject
in interface I_CmsProjectDriver
dbc
- the current database contextprojectFqn
- the name of the project
CmsDataAccessException
- if something goes wrongI_CmsProjectDriver.readProject(org.opencms.db.CmsDbContext, java.lang.String)
public java.lang.String readProjectResource(CmsDbContext dbc, CmsUUID projectId, java.lang.String resourcePath) throws CmsDataAccessException
I_CmsProjectDriver
readProjectResource
in interface I_CmsProjectDriver
dbc
- 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 java.util.List readProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
I_CmsProjectDriver
readProjectResources
in interface I_CmsProjectDriver
dbc
- 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 java.util.List readProjects(CmsDbContext dbc, java.lang.String ouFqn) throws CmsDataAccessException
I_CmsProjectDriver
readProjects
in interface I_CmsProjectDriver
dbc
- 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 java.util.List readProjectsForGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException
I_CmsProjectDriver
readProjectsForGroup
in interface I_CmsProjectDriver
dbc
- the current database contextgroup
- the requesting group
CmsDataAccessException
- if something goes wrongI_CmsProjectDriver.readProjectsForGroup(org.opencms.db.CmsDbContext, org.opencms.file.CmsGroup)
public java.util.List readProjectsForManagerGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException
I_CmsProjectDriver
readProjectsForManagerGroup
in interface I_CmsProjectDriver
dbc
- the current database contextgroup
- The requesting group
CmsDataAccessException
- if something goes wrongI_CmsProjectDriver.readProjectsForManagerGroup(org.opencms.db.CmsDbContext, org.opencms.file.CmsGroup)
public java.util.List readProjectsForResource(CmsDbContext dbc, java.lang.String rootPath) throws CmsDataAccessException
dbc
- the database contextrootPath
- the resource root path
CmsDataAccessException
- if something goes wrongpublic java.util.List readProjectsForUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException
I_CmsProjectDriver
readProjectsForUser
in interface I_CmsProjectDriver
dbc
- the current database contextuser
- the user
CmsProject
CmsDataAccessException
- if something goes wrongI_CmsProjectDriver.readProjectsForUser(org.opencms.db.CmsDbContext, org.opencms.file.CmsUser)
public java.util.List readPublishedResources(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
I_CmsProjectDriver
readPublishedResources
in interface I_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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 java.util.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_CmsProjectDriver
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 wrongI_CmsProjectDriver.readPublishJobs(org.opencms.db.CmsDbContext, long, long)
public CmsPublishList readPublishList(CmsDbContext dbc, CmsUUID publishHistoryId) throws CmsDataAccessException
I_CmsProjectDriver
readPublishList
in interface I_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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 java.lang.String readStaticExportPublishedResourceParameters(CmsDbContext dbc, java.lang.String rfsName) throws CmsDataAccessException
I_CmsProjectDriver
readStaticExportPublishedResourceParameters
in interface I_CmsProjectDriver
dbc
- 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 java.util.List readStaticExportResources(CmsDbContext dbc, int parameterResources, long timestamp) throws CmsDataAccessException
I_CmsProjectDriver
readStaticExportResources
in interface I_CmsProjectDriver
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 wrongI_CmsProjectDriver.readStaticExportResources(org.opencms.db.CmsDbContext, int, long)
public void setDriverManager(CmsDriverManager driverManager)
driverManager
- the new driver managerpublic void setSqlManager(CmsSqlManager manager)
manager
- the new SQL managerpublic void unmarkProjectResources(CmsDbContext dbc, CmsProject project) throws CmsDataAccessException
I_CmsProjectDriver
This must be done when a project will deleted
unmarkProjectResources
in interface I_CmsProjectDriver
dbc
- 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, java.util.List locks) throws CmsDataAccessException
I_CmsProjectDriver
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.
writeLocks
in interface I_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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_CmsProjectDriver
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 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_CmsProjectDriver
dbc
- 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_CmsProjectDriver
dbc
- 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, java.lang.String resourceName, int linkType, java.lang.String linkParameter, long timestamp) throws CmsDataAccessException
I_CmsProjectDriver
This is done during static export.
writeStaticExportPublishedResource
in interface I_CmsProjectDriver
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 wrongI_CmsProjectDriver.writeStaticExportPublishedResource(org.opencms.db.CmsDbContext, java.lang.String, int, java.lang.String, long)
protected CmsPublishJobInfoBean createPublishJobInfoBean(java.sql.ResultSet res) throws java.sql.SQLException
CmsPublishJobInfoBean
from a result set.
res
- the result set
CmsPublishJobInfoBean
java.sql.SQLException
- if something goes wrongprotected 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 CmsProject internalCreateProject(java.sql.ResultSet res) throws java.sql.SQLException
res
- the result set
java.sql.SQLException
- is something goes wrongprotected CmsPublishList internalDeserializePublishList(byte[] bytes) throws java.io.IOException, java.lang.ClassNotFoundException
bytes
- the byte array containing the serailized data for the publish list
java.io.IOException
- if deserialization fails
java.lang.ClassNotFoundException
- if deserialization failsprotected void internalResetResourceState(CmsDbContext dbc, CmsResource resource) throws CmsDataAccessException
dbc
- the current database contextresource
- the Cms resource
CmsDataAccessException
- if something goes wrongprotected byte[] internalSerializePublishList(CmsPublishList publishList) throws java.io.IOException
publishList
- the publish list
java.io.IOException
- if something goes wrongprotected void internalWriteHistory(CmsDbContext dbc, CmsResource resource, CmsResourceState state, java.util.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 void publishChangedFile(CmsDbContext dbc, CmsProject onlineProject, CmsResource offlineResource, java.util.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 wrongprotected 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 wrongprotected void publishNewFile(CmsDbContext dbc, CmsProject onlineProject, CmsResource offlineResource, java.util.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 |