OBEROn SDK

com.oberon.ooql.sdk
Class ObjectFile

java.lang.Object
  extended by com.oberon.ooql.sdk.OBBase
      extended by com.oberon.ooql.sdk.ObjectFile
All Implemented Interfaces:
java.io.Serializable

public class ObjectFile
extends OBBase

Class used to retrieve ObjectObj attached file content and metadata.

Version:
5.0
See Also:
Serialized Form

Field Summary
static int INDEXED_OPTION
          The Indexed flag index inside the Option Set
 
Constructor Summary
ObjectFile()
           
ObjectFile(java.lang.String fileTypeName, java.lang.String fileName)
          Define new ObjectObj's file
 
Method Summary
 void addLocalArea(java.lang.String localAreaName, int syncValue, java.lang.String sLAFileName)
          Add a LocalArea [INTERNAL USAGE]
 void fromXML(org.jdom.Element rootElement)
          Load the ObjectFile from XML element tree
 void fromXML(org.jdom.Element rootElement, java.lang.String attachmentsPath)
          Load the ObjectFile from XML element tree
 byte[] getFileContent(Framework framework)
          Get the file content
 java.lang.String getFileContentPath()
          Get the file content path
 long getFileSize()
          Get the file size (bytes)
 java.lang.String getFileSpace()
          Get the FileSpace name
 java.lang.String getFileType()
          Get the file type
 java.lang.String getHashName()
          Get the file hashed name
 void getHistory(Framework framework)
          [Inherited but not used]
 java.lang.String getHostPath()
          Get the file original host path
 java.lang.String getLAFileName(java.lang.String localAreaName)
          Get the file name inside the localarea file system
 java.util.Vector<java.lang.String> getLocalArea()
          Get the list of LocalAreas where the file is replicated.
 java.lang.String getLocker()
          Set the locker
 java.lang.String getName()
          Get the file name
 ObjectObj getObject()
          Get the ObjectStage relative ObjectObj name
 java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
          Get a property for this ObjectFile by its OOQL identifier
 java.lang.String getPutDate()
          Get the file put date
 java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
          [Inherited but not used]
 boolean isIndexed()
          Return true if the file content is indexed for searching
 boolean isLocalSynchronized(java.lang.String localAreaName)
          Check if a given LocalArea is synchronized (contains the most recent file version)
 boolean isLocked()
          Check if the file is locked
 boolean isSpaceSynchronized()
          Check if the FileSpace is synchronized (contains the most recent file version)
 java.io.File putContentToFile(java.lang.String path)
          Save the file content to a disk file
 void resetLocker()
          Reset the file lock [INTERNAL USAGE]
 void setFileContent(byte[] content)
          Set the file content [INTERNAL USAGE]
 void setFileContentPath(java.lang.String filePath)
          Set the file content path [INTERNAL USAGE]
 void setFileSize(long size)
          Set the file size [INTERNAL USAGE]
 void setFileSpace(java.lang.String fileSpaceName)
          Set the FileSpace [INTERNAL USAGE]
 void setFileType(java.lang.String fileType)
          Set the file type [INTERNAL USAGE]
 void setHashName(java.lang.String hashName)
          Set the file hashed name [INTERNAL USAGE]
 void setHostPath(java.lang.String hostPath)
          Set the file original host path [INTERNAL USAGE]
 void setIndexed(boolean indexed)
          Set the indexed flag [INTERNAL USAGE]
 void setLocker(java.lang.String userName)
          Set the locker (User) [INTERNAL USAGE]
 void setName(java.lang.String fileName)
          Set the file name [INTERNAL USAGE]
 void setObject(ObjectObj objectobj)
          Set the ObjectStage relative ObjectObj [INTERNAL USAGE]
 void setPutDate(java.lang.String date)
          Set the file put date [INTERNAL USAGE]
 java.lang.String toString(java.lang.String indent)
          Return the ObjectFile properties as a single String
 org.jdom.Element toXML(Framework framework)
          Return the ObjectFile properties as XML element tree
 org.jdom.Element toXML(java.lang.String getContentPath, Framework framework)
          Return the ObjectFile properties as XML element tree
 
Methods inherited from class com.oberon.ooql.sdk.OBBase
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEXED_OPTION

public static final int INDEXED_OPTION
The Indexed flag index inside the Option Set

See Also:
Constant Field Values
Constructor Detail

ObjectFile

public ObjectFile()

ObjectFile

public ObjectFile(java.lang.String fileTypeName,
                  java.lang.String fileName)
Define new ObjectObj's file

Parameters:
fileTypeName - the FileType name
fileName - the file name
Method Detail

setName

public void setName(java.lang.String fileName)
Set the file name [INTERNAL USAGE]


getName

public java.lang.String getName()
Get the file name

Specified by:
getName in class OBBase

setObject

public void setObject(ObjectObj objectobj)
Set the ObjectStage relative ObjectObj [INTERNAL USAGE]


getObject

public ObjectObj getObject()
Get the ObjectStage relative ObjectObj name


setHashName

public void setHashName(java.lang.String hashName)
Set the file hashed name [INTERNAL USAGE]


getHashName

public java.lang.String getHashName()
Get the file hashed name


getLAFileName

public java.lang.String getLAFileName(java.lang.String localAreaName)
Get the file name inside the localarea file system


setFileType

public void setFileType(java.lang.String fileType)
Set the file type [INTERNAL USAGE]

See Also:
FileType

getFileType

public java.lang.String getFileType()
Get the file type

See Also:
FileType

setFileSpace

public void setFileSpace(java.lang.String fileSpaceName)
Set the FileSpace [INTERNAL USAGE]


getFileSpace

public java.lang.String getFileSpace()
Get the FileSpace name


setFileSize

public void setFileSize(long size)
Set the file size [INTERNAL USAGE]


getFileSize

public long getFileSize()
Get the file size (bytes)


setLocker

public void setLocker(java.lang.String userName)
Set the locker (User) [INTERNAL USAGE]


resetLocker

public void resetLocker()
Reset the file lock [INTERNAL USAGE]


getLocker

public java.lang.String getLocker()
Set the locker

Returns:
the name of User who lock the file (empty if not locked)

isLocked

public boolean isLocked()
Check if the file is locked


setPutDate

public void setPutDate(java.lang.String date)
Set the file put date [INTERNAL USAGE]


getPutDate

public java.lang.String getPutDate()
Get the file put date


setIndexed

public void setIndexed(boolean indexed)
Set the indexed flag [INTERNAL USAGE]

Since:
1.4

isIndexed

public boolean isIndexed()
Return true if the file content is indexed for searching

Since:
1.4

setHostPath

public void setHostPath(java.lang.String hostPath)
Set the file original host path [INTERNAL USAGE]


getHostPath

public java.lang.String getHostPath()
Get the file original host path


addLocalArea

public void addLocalArea(java.lang.String localAreaName,
                         int syncValue,
                         java.lang.String sLAFileName)
Add a LocalArea [INTERNAL USAGE]


getLocalArea

public java.util.Vector<java.lang.String> getLocalArea()
Get the list of LocalAreas where the file is replicated.

Returns:
a vector of LocalArea names.

isSpaceSynchronized

public boolean isSpaceSynchronized()
Check if the FileSpace is synchronized (contains the most recent file version)


isLocalSynchronized

public boolean isLocalSynchronized(java.lang.String localAreaName)
Check if a given LocalArea is synchronized (contains the most recent file version)


getHistory

public void getHistory(Framework framework)
                throws OberonException
[Inherited but not used]

Throws:
OberonException

setFileContent

public void setFileContent(byte[] content)
Set the file content [INTERNAL USAGE]


setFileContentPath

public void setFileContentPath(java.lang.String filePath)
Set the file content path [INTERNAL USAGE]


getFileContent

public byte[] getFileContent(Framework framework)
                      throws OberonException
Get the file content

Throws:
OberonException

getFileContentPath

public java.lang.String getFileContentPath()
Get the file content path


putContentToFile

public java.io.File putContentToFile(java.lang.String path)
                              throws java.io.IOException,
                                     OberonException
Save the file content to a disk file

Parameters:
path - the disk file path/name
Throws:
java.io.IOException
OberonException

getProperty

public java.lang.String getProperty(java.lang.String propertyName,
                                    java.util.Vector<java.lang.Object> filterArgs,
                                    java.lang.String token,
                                    Framework framework)
Get a property for this ObjectFile by its OOQL identifier

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: filetype , size ...)
filterArgs - extra arguments used to compute properties
token - separator token for complex properties
framework - the current framework
Returns:
the property value

getTargetNames

public java.util.Vector<?> getTargetNames(java.lang.String composedName,
                                          java.util.Vector<java.lang.Object> filterArgs,
                                          Framework framework)
[Inherited but not used]

Specified by:
getTargetNames in class OBBase

toXML

public org.jdom.Element toXML(Framework framework)
Return the ObjectFile properties as XML element tree

Parameters:
framework - the current framework

toXML

public org.jdom.Element toXML(java.lang.String getContentPath,
                              Framework framework)
Return the ObjectFile properties as XML element tree

Parameters:
getContentPath - if not empty/null extracts the content to the specified path
framework - the current framework

fromXML

public void fromXML(org.jdom.Element rootElement)
Load the ObjectFile from XML element tree


fromXML

public void fromXML(org.jdom.Element rootElement,
                    java.lang.String attachmentsPath)
Load the ObjectFile from XML element tree


toString

public java.lang.String toString(java.lang.String indent)
Return the ObjectFile properties as a single String

Parameters:
indent - set the row indent chars

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.