org.gcube.portlets.user.homelibrary.jcr.workspace.folder.items
Class JCRFile

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.jcr.workspace.folder.items.JCRFile
All Implemented Interfaces:
org.gcube.portlets.user.homelibrary.home.workspace.folder.items.File
Direct Known Subclasses:
JCRImage, JCRPDFFile

public class JCRFile
extends Object
implements org.gcube.portlets.user.homelibrary.home.workspace.folder.items.File


Field Summary
protected static String DATA
           
protected  String nodeId
           
 
Constructor Summary
JCRFile(javax.jcr.Node node)
           
JCRFile(javax.jcr.Node node, InputStream data)
           
JCRFile(javax.jcr.Node node, String mimeType, InputStream data)
           
 
Method Summary
 InputStream getData()
           
 long getLength()
           
 String getMimeType()
           
 String getName()
           
 void save(javax.jcr.Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA

protected static final String DATA
See Also:
Constant Field Values

nodeId

protected String nodeId
Constructor Detail

JCRFile

public JCRFile(javax.jcr.Node node)
        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

JCRFile

public JCRFile(javax.jcr.Node node,
               String mimeType,
               InputStream data)
        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

JCRFile

public JCRFile(javax.jcr.Node node,
               InputStream data)
        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException
Method Detail

save

public void save(javax.jcr.Node node)
          throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getName

public String getName()
               throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getName in interface org.gcube.portlets.user.homelibrary.home.workspace.folder.items.File
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getMimeType

public String getMimeType()
Specified by:
getMimeType in interface org.gcube.portlets.user.homelibrary.home.workspace.folder.items.File

getData

public InputStream getData()
                    throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getData in interface org.gcube.portlets.user.homelibrary.home.workspace.folder.items.File
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException

getLength

public long getLength()
               throws org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException
Specified by:
getLength in interface org.gcube.portlets.user.homelibrary.home.workspace.folder.items.File
Throws:
org.gcube.portlets.user.homelibrary.home.exceptions.InternalErrorException


Copyright © 2012. All Rights Reserved.