|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.jcr.business.AbstractRepositoryFile
public abstract class AbstractRepositoryFile
| Field Summary | |
|---|---|
static String |
NODE_TYPE_FILE
|
static String |
NODE_TYPE_FILE_RESOURCE
|
static String |
NODE_TYPE_FOLDER
|
static String |
PATH_SEPARATOR
|
static String |
RESOURCE_TYPE
|
| Constructor Summary | |
|---|---|
AbstractRepositoryFile()
An empty constructor |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
boolean |
exists()
Test the existence of the file |
String |
getAbsolutePath()
Get the absolute path |
InputStream |
getContent()
Get the content of the file, if it is a file |
protected abstract String |
getElementName()
|
protected String |
getFormattedDate(Calendar date)
|
String |
getMimeType()
Get the Mime type associated with the file content |
String |
getName()
Get the name of this file |
String |
getOwner()
|
String |
getParentId()
Get the parent id of this file |
String |
getPath()
Get the path of this file |
String |
getResourceId()
Return the resource id |
String |
getResourceTypeCode()
Return the resource type |
javax.jcr.Session |
getSession()
|
String |
getXml()
Get the xml representation of this file |
protected abstract StringBuffer |
getXmlContent()
|
int |
hashCode()
|
boolean |
isDirectory()
Test the type of this file |
boolean |
isFile()
Test the type of this file |
boolean |
isLocked()
Return true if the current file is locked |
Calendar |
lastModified()
Get the date of last modification |
long |
length()
Get the length of the file content |
boolean |
ownsLock()
Returns if a user owns a lock |
void |
setAbsolutePath(String absolutePath)
|
void |
setContent(InputStream content)
Set the content of the file |
void |
setDirectory(boolean isDirectory)
|
void |
setExists(boolean exists)
|
void |
setFile(boolean isFile)
|
void |
setLastModified(Calendar lastModified)
|
void |
setLength(long length)
|
void |
setLock(boolean bIsLocked)
Modify lock status |
void |
setMimeType(String mimeType)
|
void |
setName(String strName)
Set the name of this file |
void |
setOwner(String strOwner)
|
void |
setOwnsLock(boolean bOwnsLock)
|
void |
setParentId(String strParentId)
|
void |
setPath(String path)
|
void |
setResourceId(String strResourceId)
|
void |
setSession(javax.jcr.Session session)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PATH_SEPARATOR
public static final String RESOURCE_TYPE
public static final String NODE_TYPE_FOLDER
public static final String NODE_TYPE_FILE
public static final String NODE_TYPE_FILE_RESOURCE
| Constructor Detail |
|---|
public AbstractRepositoryFile()
| Method Detail |
|---|
public boolean exists()
IRepositoryFile
exists in interface IRepositoryFilepublic void setExists(boolean exists)
exists - the _bExists to setpublic boolean isDirectory()
IRepositoryFile
isDirectory in interface IRepositoryFilepublic void setDirectory(boolean isDirectory)
isDirectory - the _bIsDirectory to setpublic boolean isFile()
IRepositoryFile
isFile in interface IRepositoryFilepublic void setFile(boolean isFile)
isFile - the _bIsFile to setpublic InputStream getContent()
IRepositoryFile
getContent in interface IRepositoryFilepublic void setContent(InputStream content)
IRepositoryFile
setContent in interface IRepositoryFilecontent - the _content to setpublic javax.jcr.Session getSession()
public void setSession(javax.jcr.Session session)
session - the _session to setpublic String getAbsolutePath()
IRepositoryFile
getAbsolutePath in interface IRepositoryFilepublic void setAbsolutePath(String absolutePath)
absolutePath - the _strAbsolutePath to setpublic String getMimeType()
IRepositoryFile
getMimeType in interface IRepositoryFilepublic void setMimeType(String mimeType)
mimeType - the _strMimeType to setpublic void setPath(String path)
path - the _strPath to setpublic String getPath()
IRepositoryFile
getPath in interface IRepositoryFileIRepositoryFile.getPath()public String getName()
IRepositoryFile
getName in interface IRepositoryFileIRepositoryFile.getName()public Calendar lastModified()
IRepositoryFile
lastModified in interface IRepositoryFileIRepositoryFile.lastModified()public long length()
IRepositoryFile
length in interface IRepositoryFileIRepositoryFile.length()public void setLength(long length)
length - the file sizepublic String getResourceId()
IRepositoryFile
getResourceId in interface IRepositoryFileRBACResource.getResourceId()public void setResourceId(String strResourceId)
strResourceId - the resource IDpublic String getResourceTypeCode()
IRepositoryFile
getResourceTypeCode in interface IRepositoryFileRBACResource.getResourceTypeCode()public boolean equals(Object o)
equals in class Objecto - the object to compare
Object.equals(java.lang.Object)public int hashCode()
hashCode in class Objectpublic String toString()
toString in class ObjectObject.toString()public String getXml()
IRepositoryFile
getXml in interface IRepositoryFileIRepositoryFile.getXml()protected abstract StringBuffer getXmlContent()
public void setLastModified(Calendar lastModified)
lastModified - the date of last modificationprotected String getFormattedDate(Calendar date)
date - the date to format
public void setName(String strName)
IRepositoryFile
setName in interface IRepositoryFilestrName - the name of the fileIRepositoryFile.setName(java.lang.String)public String getParentId()
IRepositoryFile
getParentId in interface IRepositoryFilepublic void setParentId(String strParentId)
protected abstract String getElementName()
public boolean isLocked()
IRepositoryFile
isLocked in interface IRepositoryFilepublic void setLock(boolean bIsLocked)
IRepositoryFile
setLock in interface IRepositoryFilebIsLocked - true to set a lock, false otherwisepublic String getOwner()
public void setOwner(String strOwner)
strOwner - the _strOwner to setpublic boolean ownsLock()
IRepositoryFile
ownsLock in interface IRepositoryFilepublic void setOwnsLock(boolean bOwnsLock)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||