org.silverpeas.importExport.attachment
Class AttachmentDetail

java.lang.Object
  extended by com.silverpeas.util.i18n.AbstractI18NBean
      extended by com.silverpeas.util.i18n.AbstractBean
          extended by org.silverpeas.importExport.attachment.AttachmentDetail
All Implemented Interfaces:
I18NBean, MimeTypes, Serializable, Cloneable

public final class AttachmentDetail
extends AbstractBean
implements Serializable, MimeTypes, Cloneable

Class declaration

Author:
See Also:
Serialized Form

Field Summary
static String ATTACHMENTS_FOLDER
           
static int GROUP_DIR
           
static int GROUP_DUMMY
           
static int GROUP_FILE
           
static int GROUP_FILE_LINK
           
static int GROUP_HTML_LINK
           
static String IMPORT_UPDATE_RULE_ADD
           
static String IMPORT_UPDATE_RULE_REPLACE
           
 
Fields inherited from interface com.silverpeas.util.MimeTypes
ARCHIVE_MIME_TYPE, ARCHIVE_MIME_TYPES, BZ2_ARCHIVE_MIME_TYPE, DEFAULT_MIME_TYPE, EAR_EXTENSION, EXCEL_2007_EXTENSION, EXCEL_2007_MIME_TYPE, EXCEL_2007_TEMPLATE_MIME_TYPE, EXCEL_MIME_TYPE1, EXCEL_MIME_TYPE2, GUNZIP_ARCHIVE_MIME_TYPE, GZ_ARCHIVE_MIME_TYPE, HTML_MIME_TYPE, JAR_EXTENSION, JAVA_ARCHIVE_MIME_TYPE, JSP_EXTENSION, JSP_MIME_TYPE, MIME_TYPE_OO_DB, MIME_TYPE_OO_DIAGRAM, MIME_TYPE_OO_FORMATTED_TEXT, MIME_TYPE_OO_FORMULA, MIME_TYPE_OO_GRAPHICS, MIME_TYPE_OO_IMAGE, MIME_TYPE_OO_MASTER, MIME_TYPE_OO_PRESENTATION, MIME_TYPE_OO_SPREADSHEET, MS_OFFICE_MIME_TYPES, OPEN_OFFICE_MIME_TYPES, PDF_MIME_TYPE, PHP_EXTENSION, PHP_MIME_TYPE, PLAIN_TEXT_MIME_TYPE, POWERPOINT_2007_EXTENSION, POWERPOINT_2007_MIME_TYPE, POWERPOINT_2007_TEMPLATE_MIME_TYPE, POWERPOINT_MIME_TYPE1, POWERPOINT_MIME_TYPE2, RSS_MIME_TYPE, RTF_EXTENSION, RTF_MIME_TYPE, SERVLET_HTML_CONTENT_TYPE, SHORT_ARCHIVE_MIME_TYPE, SPINFIRE_MIME_TYPE, TARGZ_ARCHIVE_MIME_TYPE, WAR_EXTENSION, WORD_2007_EXTENSION, WORD_2007_MIME_TYPE, WORD_2007_TEMPLATE_MIME_TYPE, WORD_MIME_TYPE, XHTML_MIME_TYPE, XML_MIME_TYPE
 
Constructor Summary
AttachmentDetail()
          Constructor
AttachmentDetail(AttachmentPK attachPK)
          Constructors
AttachmentDetail(AttachmentPK attachPK, String physicalName, String logicalName, String description, String type, long size, String context, Date creationDate, WAPrimaryKey foreignKey)
           
AttachmentDetail(AttachmentPK attachPK, String physicalName, String logicalName, String description, String type, long size, String context, Date creationDate, WAPrimaryKey foreignKey, String author)
          Constructor
AttachmentDetail(AttachmentPK attachPK, String physicalName, String logicalName, String description, String type, long size, String context, Date creationDate, WAPrimaryKey foreignKey, String author, String title)
           
AttachmentDetail(AttachmentPK attachPK, String physicalName, String logicalName, String description, String type, long size, String context, Date creationDate, WAPrimaryKey foreignKey, String title, String info, int orderNum)
           
AttachmentDetail(WAPrimaryKey foreignKey)
          Constructor
 
Method Summary
 void checkMimeType()
          if type is known as application/octet-stream, try to find right mimeType
 Object clone()
           
 boolean equals(Object arg0)
           
 int getAttachmentGroup()
          Retourne le group auquel appartient l'attachment.
 String getAttachmentPath()
          Return the path to the attachment file.
 String getAuthor()
           
 String getCloneId()
           
 String getContext()
          Method declaration
 Date getCreationDate()
          Methode declaration
 String getExtension()
           
 WAPrimaryKey getForeignKey()
          Method declaration
 String getImportUpdateRule()
           
 String getInfo()
           
 String getInstanceId()
           
protected  String getLanguage(String language)
           
 String getLogicalName()
          Method declaration
 int getOrderNum()
           
 String getOriginalPath()
           
 String getPhysicalName()
          Method declaration
 AttachmentPK getPK()
          the getters and setters
 long getSize()
          Method declaration
 String getTitle()
           
 String getType()
          Method declaration
 String getWorkerId()
          Get the current user who's working on the document
 String getXmlForm()
           
 XMLModelContentType getXMLModelContentType()
           
 int hashCode()
           
 boolean isOfficeDocument()
          Deprecated. Use isOpenOfficeCompatible instead as Ms Office is no longer a special case.
 boolean isOpenOfficeCompatible()
          Check if the attachment is compatible with OpenOffice using the mime type .
 boolean isRemoveAfterImport()
           
 boolean isSpinfireDocument()
           
 void setAuthor(String author)
           
 void setCloneId(String cloneId)
           
 void setContext(String context)
          Method declaration
 void setCreationDate(Date creationDate)
          Methode declaration
 void setForeignKey(WAPrimaryKey foreignKey)
          Method declaration
 void setImportUpdateRule(String updateRule)
           
 void setInfo(String info)
           
 void setInstanceId(String instanceId)
           
 void setLogicalName(String logicalName)
          Method declaration
 void setOrderNum(int orderNum)
           
 void setOriginalPath(String originalPath)
           
 void setPhysicalName(String physicalName)
          Method declaration
 void setPK(AttachmentPK pk)
          Method declaration
 void setRemoveAfterImport(boolean removeAfterImport)
           
 void setSize(long size)
          Method declaration
 void setTitle(String title)
           
 void setType(String type)
           
 void setWorkerId(String workerId)
          Set the use who's working on the document
 void setXmlForm(String xmlForm)
           
 
Methods inherited from class com.silverpeas.util.i18n.AbstractBean
getDescription, getLanguages, getName
 
Methods inherited from class com.silverpeas.util.i18n.AbstractI18NBean
addTranslation, getClonedTranslations, getDescription, getLanguage, getLanguageToDisplay, getName, getNextTranslation, getTranslation, getTranslationId, getTranslations, isRemoveTranslation, setDescription, setLanguage, setName, setRemoveTranslation, setTranslationId, setTranslations, setTranslations, setTranslations
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTACHMENTS_FOLDER

public static final String ATTACHMENTS_FOLDER
See Also:
Constant Field Values

GROUP_FILE

public static final transient int GROUP_FILE
See Also:
Constant Field Values

GROUP_FILE_LINK

public static final transient int GROUP_FILE_LINK
See Also:
Constant Field Values

GROUP_HTML_LINK

public static final transient int GROUP_HTML_LINK
See Also:
Constant Field Values

GROUP_DIR

public static final transient int GROUP_DIR
See Also:
Constant Field Values

GROUP_DUMMY

public static final transient int GROUP_DUMMY
See Also:
Constant Field Values

IMPORT_UPDATE_RULE_ADD

public static final String IMPORT_UPDATE_RULE_ADD
See Also:
Constant Field Values

IMPORT_UPDATE_RULE_REPLACE

public static final String IMPORT_UPDATE_RULE_REPLACE
See Also:
Constant Field Values
Constructor Detail

AttachmentDetail

public AttachmentDetail()
Constructor


AttachmentDetail

public AttachmentDetail(WAPrimaryKey foreignKey)
Constructor

Parameters:
foreignKey - : type WAPrimaryKey: the key of custumer object

AttachmentDetail

public AttachmentDetail(AttachmentPK attachPK,
                        String physicalName,
                        String logicalName,
                        String description,
                        String type,
                        long size,
                        String context,
                        Date creationDate,
                        WAPrimaryKey foreignKey,
                        String author)
Constructor

Parameters:
attachPK - : type AttachmentPK: the primary key of AttachmentDetail
logicalName - :type String: the name file
physicalName - : type String: the name file stored in the server
description - : type String: the description of file, size=4000 character
type - : type String: the mime type of file
size - the size of the file.
context - : type String: the context or the file is recorded
creationDate - : type Date: the date where the file was added
foreignKey - : type WAPrimaryKey: the key of custumer object
author - the creator of the attechment.

AttachmentDetail

public AttachmentDetail(AttachmentPK attachPK,
                        String physicalName,
                        String logicalName,
                        String description,
                        String type,
                        long size,
                        String context,
                        Date creationDate,
                        WAPrimaryKey foreignKey)

AttachmentDetail

public AttachmentDetail(AttachmentPK attachPK,
                        String physicalName,
                        String logicalName,
                        String description,
                        String type,
                        long size,
                        String context,
                        Date creationDate,
                        WAPrimaryKey foreignKey,
                        String title,
                        String info,
                        int orderNum)

AttachmentDetail

public AttachmentDetail(AttachmentPK attachPK,
                        String physicalName,
                        String logicalName,
                        String description,
                        String type,
                        long size,
                        String context,
                        Date creationDate,
                        WAPrimaryKey foreignKey,
                        String author,
                        String title)
Parameters:
attachPK - : type AttachmentPK: the primary key of AttachmentDetail
logicalName - :type String: the name file
physicalName - : type String: the name file stored in the server
description - : type String: the description of file, size=4000 character
type - : type String: the mime type of file
context - : type String: the context or the file is recorded
creationDate - : type Date: the date where the file was added
foreignKey - : type WAPrimaryKey: the key of custumer object
author -
title -

AttachmentDetail

public AttachmentDetail(AttachmentPK attachPK)
Constructors

Parameters:
attachPK - , the primary key of AttachmentDetail
See Also:
AttachmentPK
Method Detail

getCloneId

public String getCloneId()

setCloneId

public void setCloneId(String cloneId)

getPK

public AttachmentPK getPK()
the getters and setters


setPK

public void setPK(AttachmentPK pk)
Method declaration

Parameters:
pk -
See Also:

getPhysicalName

public String getPhysicalName()
Method declaration

Returns:
See Also:

setPhysicalName

public void setPhysicalName(String physicalName)
Method declaration

Parameters:
physicalName -
See Also:

getLogicalName

public String getLogicalName()
Method declaration

Returns:
See Also:

setLogicalName

public void setLogicalName(String logicalName)
Method declaration

Parameters:
logicalName -
See Also:

getType

public String getType()
Method declaration

Returns:
See Also:

setType

public void setType(String type)
Parameters:
type -

getSize

public long getSize()
Method declaration

Returns:
See Also:

setSize

public void setSize(long size)
Method declaration

Parameters:
size -
See Also:

getCreationDate

public Date getCreationDate()
Methode declaration

See Also:

setCreationDate

public void setCreationDate(Date creationDate)
Methode declaration

Parameters:
creationDate -
See Also:

setContext

public void setContext(String context)
Method declaration

Parameters:
context -
See Also:

getContext

public String getContext()
Method declaration

Returns:
See Also:

setForeignKey

public void setForeignKey(WAPrimaryKey foreignKey)
Method declaration

Parameters:
foreignKey -
See Also:

getForeignKey

public WAPrimaryKey getForeignKey()
Method declaration

Returns:
See Also:

setAuthor

public void setAuthor(String author)

getAuthor

public String getAuthor()

setTitle

public void setTitle(String title)

getTitle

public String getTitle()

setInfo

public void setInfo(String info)

getInfo

public String getInfo()

setOrderNum

public void setOrderNum(int orderNum)

getOrderNum

public int getOrderNum()

setInstanceId

public void setInstanceId(String instanceId)

getInstanceId

public String getInstanceId()

setWorkerId

public void setWorkerId(String workerId)
Set the use who's working on the document

Parameters:
workerId -

getWorkerId

public String getWorkerId()
Get the current user who's working on the document

Returns:

getAttachmentGroup

public int getAttachmentGroup()
Retourne le group auquel appartient l'attachment. Ce groupe est deduit du champ description

See Also:

getLanguage

protected String getLanguage(String language)

getAttachmentPath

public String getAttachmentPath()
Return the path to the attachment file.

Returns:
the path to the attachment file.

isOpenOfficeCompatible

public boolean isOpenOfficeCompatible()
Check if the attachment is compatible with OpenOffice using the mime type .

Returns:
true if the attachment is compatible with OpenOffice false otherwise.

isOfficeDocument

@Deprecated
public boolean isOfficeDocument()
Deprecated. Use isOpenOfficeCompatible instead as Ms Office is no longer a special case.

Use isOpenOfficeCompatible instead as Ms Office is no longer a special case.

Returns:

isSpinfireDocument

public boolean isSpinfireDocument()

getExtension

public String getExtension()

clone

public Object clone()
Overrides:
clone in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object arg0)
Overrides:
equals in class Object

getImportUpdateRule

public String getImportUpdateRule()

setImportUpdateRule

public void setImportUpdateRule(String updateRule)

checkMimeType

public void checkMimeType()
if type is known as application/octet-stream, try to find right mimeType


getXmlForm

public String getXmlForm()

setXmlForm

public void setXmlForm(String xmlForm)

getXMLModelContentType

public XMLModelContentType getXMLModelContentType()

isRemoveAfterImport

public boolean isRemoveAfterImport()

setRemoveAfterImport

public void setRemoveAfterImport(boolean removeAfterImport)

setOriginalPath

public void setOriginalPath(String originalPath)

getOriginalPath

public String getOriginalPath()


Copyright © 2016 Silverpeas. All Rights Reserved.