/** * Unlocks a resource.<p> * * @param resource the resource to unlock * * @throws CmsException if something goes wrong */ public void unlockResource(CmsResource resource) throws CmsException { getResourceType(resource).unlockResource(this, m_securityManager, resource); }
/** * Changes the "expire" date of a resource.<p> * * @param resource the resource to change * @param dateExpired the new expire date of the changed resource * @param recursive if this operation is to be applied recursively to all resources in a folder * * @throws CmsException if something goes wrong */ public void setDateExpired(CmsResource resource, long dateExpired, boolean recursive) throws CmsException { getResourceType(resource).setDateExpired(this, m_securityManager, resource, dateExpired, recursive); }
/** * Locks a resource.<p> * * This will be an exclusive, persistent lock that is removed only if the user unlocks it.<p> * * @param resource the resource to lock * * @throws CmsException if something goes wrong */ public void lockResource(CmsResource resource) throws CmsException { getResourceType(resource).lockResource(this, m_securityManager, resource, CmsLockType.EXCLUSIVE); }
/** * Changes the "release" date of a resource.<p> * * @param resource the resource to change * @param dateReleased the new release date of the changed resource * @param recursive if this operation is to be applied recursively to all resources in a folder * * @throws CmsException if something goes wrong */ public void setDateReleased(CmsResource resource, long dateReleased, boolean recursive) throws CmsException { getResourceType(resource).setDateReleased(this, m_securityManager, resource, dateReleased, recursive); }
/** * Changes the lock of a resource to the current user, * that is "steals" the lock from another user.<p> * * This is the "steal lock" operation.<p> * * @param resource the resource to change the lock * * @throws CmsException if something goes wrong */ public void changeLock(CmsResource resource) throws CmsException { getResourceType(resource).changeLock(this, m_securityManager, resource); }
/** * Copies a resource to the current project of the user.<p> * * This is used to extend the current users project with the * specified resource, in case that the resource is not yet part of the project. * The resource is not really copied like in a regular copy operation, * it is in fact only "enabled" in the current users project.<p> * * @param resource the resource to copy to the current project * * @throws CmsException if something goes wrong */ public void copyResourceToProject(CmsResource resource) throws CmsException { getResourceType(resource).copyResourceToProject(this, m_securityManager, resource); }
/** * Writes a list of properties for a specified resource.<p> * * Code calling this method has to ensure that the no properties * <code>a, b</code> are contained in the specified list so that <code>a.equals(b)</code>, * otherwise an exception is thrown.<p> * * @param res the resource * @param properties the list of properties to write * * @throws CmsException if something goes wrong */ public void writePropertyObjects(CmsResource res, List<CmsProperty> properties) throws CmsException { getResourceType(res).writePropertyObjects(this, m_securityManager, res, properties); }
/** * Unlocks a resource.<p> * * @param resourcename the name of the resource to unlock (full current site relative path) * * @throws CmsException if something goes wrong */ public void unlockResource(String resourcename) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.ALL); getResourceType(resource).unlockResource(this, m_securityManager, resource); }
/** * Writes a property for a specified resource.<p> * * @param resourcename the name of resource with complete path * @param property the property to write * * @throws CmsException if something goes wrong */ public void writePropertyObject(String resourcename, CmsProperty property) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).writePropertyObject(this, m_securityManager, resource, property); }
/** * Writes a property for a specified resource.<p> * * @param resourcename the name of resource with complete path * @param property the property to write * * @throws CmsException if something goes wrong */ public void writePropertyObject(String resourcename, CmsProperty property) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).writePropertyObject(this, m_securityManager, resource, property); }
/** * Unlocks a resource.<p> * * @param resourcename the name of the resource to unlock (full current site relative path) * * @throws CmsException if something goes wrong */ public void unlockResource(String resourcename) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.ALL); getResourceType(resource).unlockResource(this, m_securityManager, resource); }
/** * Changes the "release" date of a resource.<p> * * @param resourcename the name of the resource to change (full current site relative path) * @param dateReleased the new release date of the changed resource * @param recursive if this operation is to be applied recursively to all resources in a folder * * @throws CmsException if something goes wrong */ public void setDateReleased(String resourcename, long dateReleased, boolean recursive) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).setDateReleased(this, m_securityManager, resource, dateReleased, recursive); }
/** * Changes the "last modified" time stamp of a resource.<p> * * @param resourcename the name of the resource to change (full current site relative path) * @param dateLastModified time stamp the new time stamp of the changed resource * @param recursive if this operation is to be applied recursively to all resources in a folder * * @throws CmsException if something goes wrong */ public void setDateLastModified(String resourcename, long dateLastModified, boolean recursive) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).setDateLastModified(this, m_securityManager, resource, dateLastModified, recursive); }
/** * Changes the "last modified" time stamp of a resource.<p> * * @param resourcename the name of the resource to change (full current site relative path) * @param dateLastModified time stamp the new time stamp of the changed resource * @param recursive if this operation is to be applied recursively to all resources in a folder * * @throws CmsException if something goes wrong */ public void setDateLastModified(String resourcename, long dateLastModified, boolean recursive) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).setDateLastModified(this, m_securityManager, resource, dateLastModified, recursive); }
/** * Changes the "expire" date of a resource.<p> * * @param resourcename the name of the resource to change (full current site relative path) * @param dateExpired the new expire date of the changed resource * @param recursive if this operation is to be applied recursively to all resources in a folder * * @throws CmsException if something goes wrong */ public void setDateExpired(String resourcename, long dateExpired, boolean recursive) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).setDateExpired(this, m_securityManager, resource, dateExpired, recursive); }
/** * Restores a resource in the current project with a version from the historical archive.<p> * * @param structureId the structure id of the resource to restore from the archive * @param version the desired version of the resource to be restored * * @throws CmsException if something goes wrong * * @see #readResource(CmsUUID, int) */ public void restoreResourceVersion(CmsUUID structureId, int version) throws CmsException { CmsResource resource = readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).restoreResource(this, m_securityManager, resource, version); }
/** * Changes the lock of a resource to the current user, * that is "steals" the lock from another user.<p> * * This is the "steal lock" operation.<p> * * @param resourcename the name of the resource to change the lock with complete path * * @throws CmsException if something goes wrong */ public void changeLock(String resourcename) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.ALL); getResourceType(resource).changeLock(this, m_securityManager, resource); }
/** * Replaces the content, type and properties of a resource.<p> * * @param resourcename the name of the resource to replace (full current site relative path) * @param type the new type of the resource * @param content the new content of the resource * @param properties the new properties of the resource * * @throws CmsException if something goes wrong */ public void replaceResource(String resourcename, int type, byte[] content, List properties) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).replaceResource(this, m_securityManager, resource, type, content, properties); }
/** * Restores a resource in the current project with a version from the historical archive.<p> * * @param structureId the structure id of the resource to restore from the archive * @param version the desired version of the resource to be restored * * @throws CmsException if something goes wrong * * @see #readResource(CmsUUID, int) */ public void restoreResourceVersion(CmsUUID structureId, int version) throws CmsException { CmsResource resource = readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).restoreResource(this, m_securityManager, resource, version); }
/** * Creates a new sibling of the source resource.<p> * * @param source the name of the resource to create a sibling for with complete path * @param destination the name of the sibling to create with complete path * @param properties the individual properties for the new sibling * * @return the new created sibling * * @throws CmsException if something goes wrong */ public CmsResource createSibling(String source, String destination, List properties) throws CmsException { CmsResource resource = readResource(source, CmsResourceFilter.IGNORE_EXPIRATION); return getResourceType(resource).createSibling(this, m_securityManager, resource, destination, properties); }