|
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
com.oberon.ooql.sdk.FileSpace
public class FileSpace
FileSpace Admin Object: defines a object file container on file system.
| Field Summary |
|---|
| Fields inherited from class com.oberon.ooql.sdk.LocalArea |
|---|
HASHNAMES_OPTION, PROTOCOL_DATABASE, PROTOCOL_FILE, PROTOCOL_FTP, PROTOCOL_HTTP, SUBFOLDERS_OPTION |
| Fields inherited from class com.oberon.ooql.sdk.AdminBase |
|---|
bsOptions, HIDDEN_OPTION |
| Constructor Summary | |
|---|---|
FileSpace()
|
|
FileSpace(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
addLocalArea(java.lang.String localAreaName)
Add a LocalArea to this FileSpace; a LocalArea represents a FileSpace mirror where replicate the ObjectObj's attachements to let the user download them faster |
void |
check(Framework framework)
Check the if file metadata are correct for this Filespace |
java.lang.String |
compareUpdate(FileSpace refFileSpace,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this FileSpace object and let it become equals to another reference object. |
void |
create(boolean force,
Framework framework)
Create a new FileSpace object on the database |
void |
create(Framework framework)
Create a new FileSpace object on the database |
void |
defrag(Framework framework)
Remove from this Filespace files not linked with database metadata |
void |
destroy(Framework framework)
Remove the FileSpace object from the database |
void |
empty(Framework framework)
Remove all files from FileSpace |
void |
fromXML(org.jdom.Element rootElement)
Load the FileSpace object properties from XML element tree |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this FileSpace 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 |
java.util.Vector<java.lang.String> |
getLocalAreas()
Return the list of LocalAreas for this FileSpace |
java.lang.String |
getLocalAreasAsString(java.lang.String delim)
Return the list of LocalAreas, as a String |
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 FileSpace object by its OOQL identifier |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this FileSpace object with the modified properties. |
java.lang.String |
getSubPath()
Return the SubPath for this FileSpace |
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 |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the FileSpace object: connect the memory instance with the database instance |
static FileSpace |
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 |
removeLocalArea(java.lang.String localAreaName)
Remove a LocalArea from this FileSpace |
void |
setSubPath(java.lang.String subPath)
Set a SubPath for this FileSpace: the files are stored into the file system folder given by the concatenation of Path and subPath ( /Path/subPath/ ). |
void |
synchronize(java.lang.String syncFrom,
java.util.Vector<java.lang.String> syncTo,
boolean force,
boolean add,
int commit,
Framework framework)
Synchronize the FileSpace with its LocalAreas: replicate the most updates files to/from mirror folders |
java.lang.String |
toString()
Return the FileSpace object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the FileSpace object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the FileSpace object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the FileSpace object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
updateLocalAreas(java.util.Vector<java.lang.String> localAreas)
Update the localareas on the basis of a given list |
void |
write(boolean force,
Framework framework)
Update the FileSpace object to the database |
void |
write(Framework framework)
Update the FileSpace object to the database |
| Methods inherited from class com.oberon.ooql.sdk.LocalArea |
|---|
compareUpdate, getHashNames, getHost, getPath, getPermissions, getPort, getProtocol, getRehash, getURL, getUserAccount, getUserPassword, getUseSubFolders, setHashNames, setHost, setPath, setPermissions, setPort, setProtocol, setRehash, setURL, setUserAccount, setUserPassword, setUseSubFolders, toBaseString, toBaseString, toBaseXML |
| 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 |
| Constructor Detail |
|---|
public FileSpace()
public FileSpace(java.lang.String name)
throws OberonException
name - the name of the administrative object
OberonException - if the name contains invalid characters| Method Detail |
|---|
public static FileSpace 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 LocalAreaframework - 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 LocalAreaframework - 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
create in class LocalAreaforce - 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 LocalAreaframework - 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
write in class LocalAreaforce - 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 LocalAreaframework - the current framework
OberonException - usually due to DB SQL exceptions
public void destroy(Framework framework)
throws OberonException
destroy in class LocalAreaframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void synchronize(java.lang.String syncFrom,
java.util.Vector<java.lang.String> syncTo,
boolean force,
boolean add,
int commit,
Framework framework)
throws OberonException
LocalAreas: replicate the most updates files to/from mirror folders
syncFrom - the reference LocalArea name (if empty use the FileSpace as reference)syncTo - vector of destination LocalArea namesforce - replace files also if they are more recentadd - add file if it doesn't existcommit - number of synchronized objects for each transaction commit (default = 1)framework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void empty(Framework framework)
throws OberonException
empty in class LocalAreaframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void check(Framework framework)
throws OberonException
check in class LocalAreaframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rights
public void defrag(Framework framework)
throws OberonException
defrag in class LocalAreaframework - the current framework
OberonException - usually due to DB SQL exceptions or to limited user access rightspublic void setSubPath(java.lang.String subPath)
LocalArea to multiple FileSpaces when each FileSpace has its own
different subPath.
setSubPath in class LocalAreasubPath - the subpathpublic java.lang.String getSubPath()
getSubPath in class LocalAreasetSubPath(String)public void addLocalArea(java.lang.String localAreaName)
ObjectObj's attachements to let the user download them faster
localAreaName - the name of the LocalArea to addpublic void removeLocalArea(java.lang.String localAreaName)
localAreaName - the name of the LocalArea to removepublic void updateLocalAreas(java.util.Vector<java.lang.String> localAreas)
localAreas - list of LocalArea's namespublic java.util.Vector<java.lang.String> getLocalAreas()
LocalArea namespublic java.lang.String getLocalAreasAsString(java.lang.String delim)
delim - the separator item
LocalArea names separated by the delim characterspublic java.util.Vector<java.lang.String> getFileSpaces(Framework framework)
LocalArea
getFileSpaces in class LocalAreaframework - the current framework
FileSpaces names
public java.lang.String getFileSpacesAsString(java.lang.String delim,
Framework framework)
LocalArea
getFileSpacesAsString in class LocalAreadelim - 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 LocalAreapropertyName - 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 LocalAreacomposedName - OOQL property identifier/name (example: localarea .. )filterArgs - extra arguments used to compute propertiesframework - the current framework
public java.lang.String toString()
toString in class LocalAreapublic java.lang.String toString(Framework framework)
toString in class LocalAreaframework - the current frameworkpublic org.jdom.Element toXML(Framework framework)
toXML in class LocalAreaframework - the current framework
public org.jdom.Element toXML(boolean getImage,
boolean fullDump,
Framework framework)
toXML in class LocalAreagetImage - 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 LocalAreapublic java.lang.String getCreateCommand(boolean force)
getCreateCommand in class LocalAreaforce - if true append the "force" options at the endpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand in class LocalAreaforce - if true append the "force" options at the end
public java.lang.String compareUpdate(FileSpace refFileSpace,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
throws OberonException
refFileSpace - the reference FileSpace 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 | |||||||||