|
||||||||||
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 IRepositoryFile
public void setExists(boolean exists)
exists
- the _bExists to setpublic boolean isDirectory()
IRepositoryFile
isDirectory
in interface IRepositoryFile
public void setDirectory(boolean isDirectory)
isDirectory
- the _bIsDirectory to setpublic boolean isFile()
IRepositoryFile
isFile
in interface IRepositoryFile
public void setFile(boolean isFile)
isFile
- the _bIsFile to setpublic InputStream getContent()
IRepositoryFile
getContent
in interface IRepositoryFile
public void setContent(InputStream content)
IRepositoryFile
setContent
in interface IRepositoryFile
content
- 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 IRepositoryFile
public void setAbsolutePath(String absolutePath)
absolutePath
- the _strAbsolutePath to setpublic String getMimeType()
IRepositoryFile
getMimeType
in interface IRepositoryFile
public void setMimeType(String mimeType)
mimeType
- the _strMimeType to setpublic void setPath(String path)
path
- the _strPath to setpublic String getPath()
IRepositoryFile
getPath
in interface IRepositoryFile
IRepositoryFile.getPath()
public String getName()
IRepositoryFile
getName
in interface IRepositoryFile
IRepositoryFile.getName()
public Calendar lastModified()
IRepositoryFile
lastModified
in interface IRepositoryFile
IRepositoryFile.lastModified()
public long length()
IRepositoryFile
length
in interface IRepositoryFile
IRepositoryFile.length()
public void setLength(long length)
length
- the file sizepublic String getResourceId()
IRepositoryFile
getResourceId
in interface IRepositoryFile
RBACResource.getResourceId()
public void setResourceId(String strResourceId)
strResourceId
- the resource IDpublic String getResourceTypeCode()
IRepositoryFile
getResourceTypeCode
in interface IRepositoryFile
RBACResource.getResourceTypeCode()
public boolean equals(Object o)
equals
in class Object
o
- the object to compare
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
Object.toString()
public String getXml()
IRepositoryFile
getXml
in interface IRepositoryFile
IRepositoryFile.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 IRepositoryFile
strName
- the name of the fileIRepositoryFile.setName(java.lang.String)
public String getParentId()
IRepositoryFile
getParentId
in interface IRepositoryFile
public void setParentId(String strParentId)
protected abstract String getElementName()
public boolean isLocked()
IRepositoryFile
isLocked
in interface IRepositoryFile
public void setLock(boolean bIsLocked)
IRepositoryFile
setLock
in interface IRepositoryFile
bIsLocked
- 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 IRepositoryFile
public void setOwnsLock(boolean bOwnsLock)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |