fr.paris.lutece.plugins.jcr.business
Interface IRepositoryFile

All Known Implementing Classes:
AbstractRepositoryFile, JcrRepositoryFileImpl, VersionFileImpl, VersionnableRepositoryFileImpl

public interface IRepositoryFile

Interface for elements contained in a repository


Method Summary
 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
 String getMimeType()
          Get the Mime type associated with the file content
 String getName()
          Get the name of this file
 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
 String getXml()
          Get the xml representation of this file
 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 setContent(InputStream content)
          Set the content of the file
 void setLock(boolean locked)
          Modify lock status
 void setName(String strName)
          Set the name of this file
 

Method Detail

getPath

String getPath()
Get the path of this file

Returns:
the path

getAbsolutePath

String getAbsolutePath()
Get the absolute path

Returns:
the absolute path

getName

String getName()
Get the name of this file

Returns:
the name

setName

void setName(String strName)
Set the name of this file

Parameters:
strName - the name

getContent

InputStream getContent()
Get the content of the file, if it is a file

Returns:
an inputstream with the file content

isDirectory

boolean isDirectory()
Test the type of this file

Returns:
true if it is a directory, false otherwise

isFile

boolean isFile()
Test the type of this file

Returns:
true if it is a directory, false otherwise

lastModified

Calendar lastModified()
Get the date of last modification

Returns:
a date

length

long length()
Get the length of the file content

Returns:
length in bytes

getResourceId

String getResourceId()
Return the resource id

Returns:
an id

getResourceTypeCode

String getResourceTypeCode()
Return the resource type

Returns:
a resource type

exists

boolean exists()
Test the existence of the file

Returns:
true if a file exists in the repository

getMimeType

String getMimeType()
Get the Mime type associated with the file content

Returns:
the mime type

getXml

String getXml()
Get the xml representation of this file

Returns:
an XML string

getParentId

String getParentId()
Get the parent id of this file

Returns:
the parent id or null if it has no parents

setContent

void setContent(InputStream content)
Set the content of the file

Parameters:
content - an InputStream

isLocked

boolean isLocked()
Return true if the current file is locked

Returns:
true if the node is locked

setLock

void setLock(boolean locked)
Modify lock status

Parameters:
locked - true to set a lock, false otherwise

ownsLock

boolean ownsLock()
Returns if a user owns a lock

Returns:
true if current user owns a lock on this file


Copyright © 2014 Mairie de Paris. All Rights Reserved.