|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.libraries.repository.file.FileContentEntity
public abstract class FileContentEntity
A content-entity that uses a java.io.File as backend. The entity can read the
LibRepositoryBoot.SIZE_ATTRIBUTE
and can read and write the
LibRepositoryBoot.VERSION_ATTRIBUTE
.
Constructor Summary | |
---|---|
protected |
FileContentEntity(ContentLocation parent,
java.io.File backend)
Creates a new content-entity for the given file using the given content location as parent. |
protected |
FileContentEntity(Repository repository,
java.io.File backend)
Creates a new root content-entity for the given file using the given content location as parent. |
Method Summary | |
---|---|
boolean |
delete()
Attempts to delete the entity. |
java.lang.Object |
getAttribute(java.lang.String domain,
java.lang.String key)
Returns a attribute value for the given domain (namespace) and attribute-name. |
protected java.io.File |
getBackend()
Returns the file that provides the backend of this entity. |
java.lang.Object |
getContentId()
Returns a unique identifier. |
java.lang.String |
getName()
Returns the name of the file. |
ContentLocation |
getParent()
Returns a reference to the parent location. |
Repository |
getRepository()
Returns the current repository, to which tis entity belongs. |
boolean |
setAttribute(java.lang.String domain,
java.lang.String key,
java.lang.Object value)
Updates the attribute value for the given attribute domain and name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FileContentEntity(ContentLocation parent, java.io.File backend)
parent
- the content location representing the parent directory.backend
- the file representing this entity.protected FileContentEntity(Repository repository, java.io.File backend)
repository
- the repository for which this entity is created.backend
- the file representing this entity.Method Detail |
---|
public Repository getRepository()
getRepository
in interface ContentEntity
public java.lang.String getName()
getName
in interface ContentEntity
protected java.io.File getBackend()
public java.lang.Object getContentId()
getContentId
in interface ContentEntity
public java.lang.Object getAttribute(java.lang.String domain, java.lang.String key)
LibRepositoryBoot
class.
getAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the name of the attribute.
public boolean setAttribute(java.lang.String domain, java.lang.String key, java.lang.Object value)
setAttribute
in interface ContentEntity
domain
- the attribute domain.key
- the attribute namevalue
- the new attribute value.
public ContentLocation getParent()
getParent
in interface ContentEntity
public boolean delete()
delete
in interface ContentEntity
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |