|
OBEROn SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.oberon.ooql.sdk.OBBase
com.oberon.ooql.sdk.AdminBase
com.oberon.ooql.sdk.LocalArea
public class LocalArea
LocalArea Admin Object: defines a file container on a distributed file system.
| Field Summary | |
|---|---|
static int |
HASHNAMES_OPTION
The file Hash flag index inside the Option Set |
static java.lang.String |
PROTOCOL_DATABASE
DATABASE protocol - files are stored inside the DB |
static java.lang.String |
PROTOCOL_FILE
FILE protocol - can be used only when the file storage folder is in the same mainframe of the java environment (usually the RMI server). |
static java.lang.String |
PROTOCOL_FTP
FTP protocol - the default transfer method |
static java.lang.String |
PROTOCOL_HTTP
HTTP protocol - transfer files using web-services or servlets |
static int |
SUBFOLDERS_OPTION
The use Sub Folder flag index inside the Option Set |
| Fields inherited from class com.oberon.ooql.sdk.AdminBase |
|---|
bsOptions, HIDDEN_OPTION |
| Constructor Summary | |
|---|---|
LocalArea()
|
|
LocalArea(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
check(Framework framework)
Check the if file metadata are correct for this LocalArea |
java.lang.String |
compareUpdate(LocalArea refLocalArea,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this LocalArea object and let it become equals to another reference object. |
void |
create(boolean force,
Framework framework)
Create a new LocalArea object on the database |
void |
create(Framework framework)
Create a new LocalArea object on the database |
void |
defrag(Framework framework)
Remove all unlinked files from LocalArea |
void |
destroy(Framework framework)
Remove the LocalArea object from the database |
void |
empty(Framework framework)
Remove all files from LocalArea |
void |
fromXML(org.jdom.Element rootElement)
Load the LocalArea object properties from XML element tree |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this LocalArea object with the settled properties |
java.util.Vector<java.lang.String> |
getFileSpaces(Framework framework)
Return the list of FileSpaces where this Field is used |
java.lang.String |
getFileSpacesAsString(java.lang.String delim,
Framework framework)
Return the list of FileSpaces where this Field is used, as a String |
boolean |
getHashNames()
Check if file names are hashed when stored into the file system |
java.lang.String |
getHost()
Get the FTP host |
java.lang.String |
getPath()
Get the file storage folder path |
int |
getPermissions()
Get the file system permissions for the file storage folder |
int |
getPort()
Get the FTP port |
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 LocalArea object by its OOQL identifier |
java.lang.String |
getProtocol()
Get the file transfer protocol. |
boolean |
getRehash()
|
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this LocalArea object with the modified properties. |
java.lang.String |
getSubPath()
Get the relative FileSpace subPath |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
java.lang.String |
getURL()
Get the web-service or servlet URL (http) |
java.lang.String |
getUserAccount()
Get the FTP user account |
java.lang.String |
getUserPassword()
Get the FTP account password |
boolean |
getUseSubFolders()
Check if hashed file names are organized into sub folders |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the LocalArea object: connect the memory instance with the database instance |
static LocalArea |
open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open an administrative object and read properties from the database or retrieve them from memory |
void |
setHashNames(boolean hashNames)
Set if file names in the storage folder must be hashed. |
void |
setHost(java.lang.String host)
Set the FTP host; can be the IP address or the host name. |
void |
setPath(java.lang.String path)
Set the FTP path (ftp) of the Local file system path (file) for the file storage folder |
void |
setPermissions(int permissions)
Set the file system permissions for the file storage folder. |
void |
setPort(int port)
Set the FTP port. |
void |
setProtocol(java.lang.String protocol)
Set the file transfer protocol for LocalAreas and FileSpaces. |
void |
setRehash(boolean rehash)
|
void |
setSubPath(java.lang.String subPath)
Set the FileSpace subPath: each LocalArea inherits the subPath from the relative FileSpace |
void |
setURL(java.lang.String url)
Set the web-service or servlet URL (http) |
void |
setUserAccount(java.lang.String userName)
Set the FTP user account |
void |
setUserPassword(java.lang.String password)
Set the FTP account password |
void |
setUseSubFolders(boolean useSubFolders)
Set if hashed files in the storage folder must be organized into sub folders. |
java.lang.String |
toBaseString()
Return the object basic properties as a single String |
java.lang.String |
toBaseString(Framework framework)
Return the object extended properties as a single String |
org.jdom.Element |
toBaseXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the object properties as XML element tree |
java.lang.String |
toString()
Return the LocalArea object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the LocalArea object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the LocalArea object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the LocalArea object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
write(boolean force,
Framework framework)
Update the LocalArea object to the database |
void |
write(Framework framework)
Update the LocalArea object to the database |
| 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, wait, wait, wait |
| Field Detail |
|---|
public static final int SUBFOLDERS_OPTION
public static final int HASHNAMES_OPTION
public static final java.lang.String PROTOCOL_FTP
public static final java.lang.String PROTOCOL_FILE
public static final java.lang.String PROTOCOL_HTTP
public static final java.lang.String PROTOCOL_DATABASE
| Constructor Detail |
|---|
public LocalArea()
public LocalArea(java.lang.String name)
throws OberonException
name - the name of the administrative object
OberonException - if the name contains invalid characters| Method Detail |
|---|
public static LocalArea open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
throws OberonException
name - the object nameframework - the current frameworkcounters - administrative object synch counters (if null read them from database)
OberonException - usually due to DB SQL exceptions
public void link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
throws OberonException
link in class AdminBaseframework - the current frameworkcounters - administrative object synch counters (if null read them from database)
OberonException - usually due to DB SQL exceptions
public void create(Framework framework)
throws OberonException
create in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void create(boolean force,
Framework framework)
throws OberonException
force - if true ignores optional featuresframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void write(Framework framework)
throws OberonException
write in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void write(boolean force,
Framework framework)
throws OberonException
force - if true ignores optional featuresframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void unlink(Framework framework)
throws OberonException
unlink in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions
public void destroy(Framework framework)
throws OberonException
destroy in class AdminBaseframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void defrag(Framework framework)
throws OberonException
framework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void check(Framework framework)
throws OberonException
framework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void empty(Framework framework)
throws OberonException
framework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void setProtocol(java.lang.String protocol)
throws OberonException
FileSpaces.
protocol - the transfer protocol: ( PROTOCOL_FTP ,PROTOCOL_FILE , PROTOCOL_HTTP , PROTOCOL_DATABASE )
OberonExceptionpublic java.lang.String getProtocol()
public void setHost(java.lang.String host)
public java.lang.String getHost()
public void setPort(int port)
public int getPort()
public void setPath(java.lang.String path)
public java.lang.String getPath()
public void setSubPath(java.lang.String subPath)
FileSpace subPath: each LocalArea inherits the subPath from the relative FileSpace
public java.lang.String getSubPath()
FileSpace subPath
public void setURL(java.lang.String url)
public java.lang.String getURL()
public void setPermissions(int permissions)
permissions - the typical Unix permission value ( example: 777 , 656 )public int getPermissions()
public void setUserAccount(java.lang.String userName)
public java.lang.String getUserAccount()
public void setUserPassword(java.lang.String password)
public java.lang.String getUserPassword()
public void setUseSubFolders(boolean useSubFolders)
useSubFolders - if true, hashed file names are stored in a two level sub-folderspublic boolean getUseSubFolders()
public void setHashNames(boolean hashNames)
ObjectObjs overwrite themselves
hashNames - if true file names are converted to a 8 digits hex number.FileType extension.public boolean getHashNames()
public void setRehash(boolean rehash)
public boolean getRehash()
public java.util.Vector<java.lang.String> getFileSpaces(Framework framework)
framework - the current framework
FileSpaces names
public java.lang.String getFileSpacesAsString(java.lang.String delim,
Framework framework)
delim - the separator itemframework - the current framework
FileSpaces separated by the delim characters
public java.lang.String getProperty(java.lang.String propertyName,
java.util.Vector<java.lang.Object> filterArgs,
java.lang.String token,
Framework framework)
getProperty in class OBBasepropertyName - OOQL property identifier/name (example: host , path ...)filterArgs - extra arguments used to compute propertiestoken - separator token for complex propertiesframework - the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
getTargetNames in class OBBasecomposedName - OOQL property identifier/name (example: feature .. )filterArgs - extra arguments used to compute propertiesframework - the current framework
public java.lang.String toBaseString()
public java.lang.String toString()
toString in class AdminBasepublic java.lang.String toBaseString(Framework framework)
framework - the current frameworkpublic java.lang.String toString(Framework framework)
toString in class AdminBaseframework - the current framework
public org.jdom.Element toBaseXML(boolean getImage,
boolean fullDump,
Framework framework)
getImage - true to include "imagedata" element with the base64 encoded image datafullDump - true to include detailed informationframework - the current frameworkpublic org.jdom.Element toXML(Framework framework)
toXML in class AdminBaseframework - the current framework
public org.jdom.Element toXML(boolean getImage,
boolean fullDump,
Framework framework)
toXML in class AdminBasegetImage - true to include "imagedata" element with the base64 encoded image datafullDump - true to include detailed informationframework - the current frameworkpublic void fromXML(org.jdom.Element rootElement)
fromXML in class AdminBasepublic java.lang.String getCreateCommand(boolean force)
getCreateCommand in class AdminBaseforce - if true append the "force" options at the endpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand in class AdminBaseforce - if true append the "force" options at the end
public java.lang.String compareUpdate(LocalArea refLocalArea,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
throws OberonException
refLocalArea - the reference LocalArea objectcheckImage - if true compare also the image iconoverwrite - if true update the database object instanceforce - if true ignores optional propertiesframework - the current framework
OberonExceptionfromXML(Element)
|
OBEROn SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||