org.exoplatform.faq.service
Class FileAttachment

java.lang.Object
  extended by org.exoplatform.faq.service.FileAttachment

public class FileAttachment
extends Object


Constructor Summary
FileAttachment()
           
 
Method Summary
 String getId()
          Gets the file's id, each file have an unique id.
 InputStream getInputStream()
          Gets the input stream which is file's data.
 String getMimeType()
          Gets the mime type.
 String getName()
          Gets the name of file attach.
 String getNodeName()
          Get the name of Node file
 String getPath()
          Gets the path of file, this path is used to view or down load file.
 long getSize()
          Gets the size of file.
 String getWorkspace()
          Gets the workspace.
 void setId(String s)
          Sets the id for this file, setting the id for this file is done auto by system.
 void setInputStream(InputStream in)
          Sets the input stream which is file's data.
 void setMimeType(String mimeType_)
          Sets the mime type.
 void setName(String name_)
          Sets the name of file for fileAttachment object when upload or get data.
 void setNodeName(String nodeName)
          Registers name for node which is used to store file attachment
 void setPath(String p)
          Sets the path which is the path in server.
 void setSize(long size_)
          Sets the size for file is uploaded, setting size for file is done auto by sytem.
 void setWorkspace(String ws)
          Sets the workspace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileAttachment

public FileAttachment()
Method Detail

getId

public String getId()
Gets the file's id, each file have an unique id. this id is used to edit question when upload file

Returns:
the id

setId

public void setId(String s)
Sets the id for this file, setting the id for this file is done auto by system.

Parameters:
s - the new id

getPath

public String getPath()
Gets the path of file, this path is used to view or down load file.

Returns:
the path of file

setPath

public void setPath(String p)
Sets the path which is the path in server. System auto set this property for File object

Parameters:
p - the new path

getWorkspace

public String getWorkspace()
Gets the workspace.

Returns:
the workspace

setWorkspace

public void setWorkspace(String ws)
Sets the workspace.

Parameters:
ws - the new workspace

getMimeType

public String getMimeType()
Gets the mime type.

Returns:
the mime type

setMimeType

public void setMimeType(String mimeType_)
Sets the mime type.

Parameters:
mimeType_ - the new mime type

getSize

public long getSize()
Gets the size of file.

Returns:
the size

setSize

public void setSize(long size_)
Sets the size for file is uploaded, setting size for file is done auto by sytem.

Parameters:
size_ - the new size

getName

public String getName()
Gets the name of file attach.

Returns:
the name

setName

public void setName(String name_)
Sets the name of file for fileAttachment object when upload or get data.

Parameters:
name_ - the new name

getInputStream

public InputStream getInputStream()
                           throws Exception
Gets the input stream which is file's data.

Returns:
data of file
Throws:
Exception - if Repository or value format occur exception

setInputStream

public void setInputStream(InputStream in)
                    throws Exception
Sets the input stream which is file's data.

Parameters:
in - the new input stream
Throws:
Exception - the exception

getNodeName

public String getNodeName()
Get the name of Node file

Returns:
name of node

setNodeName

public void setNodeName(String nodeName)
Registers name for node which is used to store file attachment

Parameters:
nodeName -


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.