|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.ResourcesManager
public class ResourcesManager
Manager for resources of a CMS document.
| Field Summary | |
|---|---|
static java.lang.String |
RESOURCES_META_SUFFIX
|
static java.lang.String |
RESOURCES_PREFIX
|
| Constructor Summary | |
|---|---|
ResourcesManager(Document document)
Create a new instance of Resources. |
|
| Method Summary | |
|---|---|
void |
deleteResources()
Deletes all resources. |
Document |
getDocument()
|
protected java.io.File[] |
getFiles(java.io.FileFilter filter)
Returns the resources that are matched by a certain file filter. |
java.io.File[] |
getImageResources()
Return all resources which are images. |
java.io.File |
getMetaFile(java.io.File resource)
Returns a meta file for a given resource. |
java.io.File[] |
getMetaFiles()
Get the meta data for all resources for the associated document. |
java.io.File |
getPath()
Get the path to the resources. |
java.lang.String |
getPathFromPublication()
Get the path to the resources. |
java.io.File[] |
getResources()
Get all resources for the associated document. |
java.lang.String |
getResourceUrl(java.io.File resource)
Returns the path of a resource relative to the context prefix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RESOURCES_PREFIX
public static final java.lang.String RESOURCES_META_SUFFIX
| Constructor Detail |
|---|
public ResourcesManager(Document document)
document - the document for which the resources are managed| Method Detail |
|---|
public java.lang.String getPathFromPublication()
public java.io.File getPath()
public java.lang.String getResourceUrl(java.io.File resource)
public java.io.File[] getResources()
public java.io.File[] getImageResources()
protected java.io.File[] getFiles(java.io.FileFilter filter)
filter - A file filter.
public java.io.File[] getMetaFiles()
public java.io.File getMetaFile(java.io.File resource)
throws java.lang.IllegalArgumentException
resource - A resource the meta file should be returned for.
java.lang.IllegalArgumentException - If resource is a meta file itself.public void deleteResources()
public Document getDocument()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||