| com.uwyn.rife.cmf.dam.ContentManager
All known Subclasses: com.uwyn.rife.cmf.dam.contentmanagers.DatabaseContent,
ContentManager | public interface ContentManager (Code) | | A ContentManager manages content that is stored in a back-end
data store.
Content is isolated in repositories that should have unique names. The
installation of a content manager creates an initial default repository. If
others are needed, they have to be created explicitly.
All content is identified by a unique location . The
location is formatted like this:
repository:path
If the repository: prefix is omitted, the content will be
stored in the default repository (see
com.uwyn.rife.cmf.ContentRepository.DEFAULT ContentRepository.DEFAULT ).
The path should start with a slash that makes it 'absolute', this is
completely analogue to file system paths.
author: Geert Bevin (gbevin[remove] at uwyn dot com)i version: $Revision: 3634 $ since: 1.0 |
containsRepository | public boolean containsRepository(String name) throws ContentManagerException(Code) | | Checks if the content manager contains a certain repository.
Parameters: name - the name of the repository to check true if the repository exists; orfalse if it doesn't. exception: ContentManagerException - if an unexpected error occurred since: 1.4
|
createRepository | public boolean createRepository(String name) throws ContentManagerException(Code) | | Creates a new repository.
Parameters: name - the name of the repository to create true if the creation was successful; orfalse if it wasn't. exception: ContentManagerException - if an unexpected error occurred since: 1.0
|
deleteContent | public boolean deleteContent(String location) throws ContentManagerException(Code) | | Delete the content at a certain location.
This will delete all versions of the content at that location.
Parameters: location - the location where the content has to be deleted true if the deletion was successfully; or false if it wasn't. exception: ContentManagerException - if an unexpected error occurred since: 1.0
|
getContentForHtml | public String getContentForHtml(String location, ElementSupport element, String serveContentExitName) throws ContentManagerException(Code) | | Retrieves a content representation for use in html.
This is mainly used to integrate content data inside a html
document. For instance, html content will be displayed as-is, while
image content will cause an image tag to be generated with the correct
source URL to serve the image.
Parameters: location - the location whose content will be displayed Parameters: element - an active element instance Parameters: serveContentExitName - the exit namet that leads to a com.uwyn.rife.cmf.elements.ServeContent ServeContent element. This willbe used to generate URLs for content that can't be directly displayedin-line. exception: ContentManagerException - if an expected error occurred since: 1.0 |
getContentInfo | public ContentInfo getContentInfo(String location) throws ContentManagerException(Code) | | Retrieves the content info from a certain location.
Parameters: location - the location whose content info has to be retrieved an instance of ContentInfo ; ornull if no content is present at the location exception: ContentManagerException - if an expected error occurred since: 1.0
|
hasContentData | public boolean hasContentData(String location) throws ContentManagerException(Code) | | Checks whether content data is available at a certain location.
Parameters: location - the location that has to be checked true if content data is available; orfalse if it isn't. exception: ContentManagerException - if an expected error occurred since: 1.0
|
serveContentData | public void serveContentData(ElementSupport element, String location) throws ContentManagerException(Code) | | Serves content data from a certain location through the provided
element.
This is intended to take over the complete handling of the request,
so no other content should be output and no headers manipulated in the
element if this method is called.
Parameters: element - an active element instance Parameters: location - the location whose content data has to be served exception: ContentManagerException - if an expected error occurred since: 1.0 |
storeContent | public boolean storeContent(String location, Content content, ContentTransformer transformer) throws ContentManagerException(Code) | | Store content at a certain location.
If content is already present at this location, the new content will
become the current version and the old content remains available as an
older version.
Parameters: location - the location where the content has to be stored. Parameters: content - the content that has to be stored Parameters: transformer - a transformer that will modify the content data; or null if the content data should stay intact true if the storing was successfully; or
false if it wasn't. exception: ContentManagerException - if an unexpected error occurred since: 1.0
|
useContentData | public ResultType useContentData(String location, ContentDataUser user) throws ContentManagerException(Code) | | Use the data of content at a certain location.
Some content data will only be available during this method call due
to their volatile nature (certain streams for instance). Therefore, one
has to be careful when trying to move the data that is provided to the
content user outside this method. The behaviour is undefined.
Parameters: location - the location whose content will be used Parameters: user - the content user instance that will be called to usecontent data the data that the ContentDataUser.useContentData(Object)returns after its usage exception: ContentManagerException - if an unexpected error occurred since: 1.0 |
|
|