|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.OBBase com.oberon.ooql.sdk.AdminBase com.oberon.ooql.sdk.Program
public class Program
Program Admin Object: defines java programs employed as event Trigger
s or object methods
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME
The "CLASSNAME" keyword used in the program code |
static java.lang.String |
EXTEND
The "EXTEND" keyword used in the program code |
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
Program()
|
|
Program(java.lang.String name)
|
Method Summary | |
---|---|
java.lang.String |
compareSimple(Program refProgram,
boolean checkImage)
Return the template of OOQL command to update this Program object and let it become equals to another reference object. |
java.lang.String |
compareUpdate(Program refProgram,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this Program object and let it become equals to another reference object. |
static void |
compile(AdminQuery adminQuery,
Framework framework,
boolean force)
Compile one or more Programs |
void |
compile(Framework framework,
boolean force)
Compile the Program |
void |
create(boolean force,
Framework framework)
Create a new Program object on the database |
void |
create(Framework framework)
Create a new Program object on the database |
void |
destroy(Framework framework)
Remove the Program object from the database. |
Framework |
execute(Framework framework,
java.util.Vector<java.lang.Object> args)
Execute the Program |
void |
fromXML(org.jdom.Element rootElement)
Load the Program object from XML element tree |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this Program object with the settled properties |
java.lang.String |
getCreateCommand(boolean force,
boolean simple)
Return the OOQL command to create this Program object with the settled properties |
java.lang.String |
getJavaClass()
Get the java class name for this Program |
java.util.Vector<java.lang.String> |
getOwnSubPrograms(Framework framework)
Return the list of sub-Programs directly derived from this Program |
java.lang.String |
getOwnSubProgramsAsString(java.lang.String delim,
Framework framework)
Return the list of sub-Programs directly derived from this Program, 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 Program object by its OOQL identifier |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this Program object with the modified properties. |
java.lang.String |
getSourceCode()
Get the Program java source code |
java.util.Vector<java.lang.String> |
getSubPrograms(Framework framework)
Return the full list of sub-Programs derived from this Program |
java.lang.String |
getSubProgramsAsString(java.lang.String delim,
Framework framework)
Return the full list of sub-Programs derived from this Program, as a String |
java.lang.String |
getSuper()
Get the Super Program name. |
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.Object |
invoke(java.lang.String methodName,
Framework framework,
java.util.Vector<?> args)
Invoke a method defined into the Program java class |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the Program object: connect the memory instance with the database instance |
static Program |
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 |
static java.util.Vector<java.lang.String> |
parseArgs(java.lang.String argString)
Parse the input arguments from a command line string |
void |
setJavaClass(java.lang.String javaClass)
Set the java class name for this Program [INTERNAL USAGE] |
void |
setName(java.lang.String name)
Set the Program name |
void |
setSourceCode(java.lang.String javacode)
Set the Program java source code. |
void |
setSourceFile(java.lang.String fileName)
Load the Program java source code from a local disk file |
java.lang.String |
toString()
Return the Program object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the Program object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the Program object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the Program 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 Program object to the database |
void |
write(Framework framework)
Update the Program 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 java.lang.String CLASSNAME
public static final java.lang.String EXTEND
Constructor Detail |
---|
public Program()
public Program(java.lang.String name) throws OberonException
name
- the name of the administrative object
OberonException
- if the name contains invalid charactersMethod Detail |
---|
public static Program 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 exceptionspublic void link(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
link
in class AdminBase
framework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void create(Framework framework) throws OberonException
create
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic 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 rightspublic void write(Framework framework) throws OberonException
write
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic 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 rightspublic void unlink(Framework framework) throws OberonException
unlink
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void destroy(Framework framework) throws OberonException
destroy
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void compile(Framework framework, boolean force) throws OberonException
framework
- the current frameworkforce
- if true re-compile the Program also if already compiled
OberonException
- due to Java compilation errorspublic static void compile(AdminQuery adminQuery, Framework framework, boolean force) throws OberonException
adminQuery
- administrative query to extract the Program list to compileframework
- the current frameworkforce
- if true re-compile the Program(s) also if already compiled
OberonException
- due to Java compilation errorspublic Framework execute(Framework framework, java.util.Vector<java.lang.Object> args) throws OberonException
framework
- the current frameworkargs
- vector of Program input arguments
OberonException
- due to execution errors or programmatically raised exceptionspublic java.lang.Object invoke(java.lang.String methodName, Framework framework, java.util.Vector<?> args) throws OberonException
methodName
- the method nameframework
- the current frameworkargs
- vector of Program input arguments
OberonException
- due to execution errors or programmatically raised exceptionspublic void setName(java.lang.String name) throws OberonException
setName
in class AdminBase
name
- the name of the administrative object
OberonException
- if the name contains the pipe '|' characterpublic void setSourceCode(java.lang.String javacode)
ProgramCode
interface and in particular
it has to include the OberonMain method.
It must have the following structure:
public void setSourceFile(java.lang.String fileName) throws OberonException
fileName
- the path/name of java code file
OberonException
- due to file IO Exceptionspublic void setJavaClass(java.lang.String javaClass)
javaClass
- the java class namepublic java.lang.String getJavaClass()
public java.lang.String getSuper()
public java.lang.String getSourceCode()
public java.util.Vector<java.lang.String> getSubPrograms(Framework framework)
framework
- the current framework
public java.lang.String getSubProgramsAsString(java.lang.String delim, Framework framework)
delim
- the separator itemframework
- the current framework
public java.util.Vector<java.lang.String> getOwnSubPrograms(Framework framework)
framework
- the current framework
public java.lang.String getOwnSubProgramsAsString(java.lang.String delim, Framework framework)
delim
- the separator itemframework
- the current framework
public static java.util.Vector<java.lang.String> parseArgs(java.lang.String argString) throws java.lang.Exception
java.lang.Exception
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 OBBase
propertyName
- OOQL property identifier/name (example: source , superprogram ...)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 OBBase
composedName
- OOQL property identifier/name (example: super, .. )filterArgs
- extra arguments used to compute propertiesframework
- the current framework
public java.lang.String toString()
toString
in class AdminBase
public java.lang.String toString(Framework framework)
toString
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(Framework framework)
toXML
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
toXML
in class AdminBase
getImage
- 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 AdminBase
public java.lang.String getCreateCommand(boolean force)
getCreateCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getCreateCommand(boolean force, boolean simple)
simple
- if true return the command templatepublic java.lang.String getSaveCommand(boolean force)
getSaveCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String compareUpdate(Program refProgram, boolean checkImage, boolean overwrite, boolean force, Framework framework) throws OberonException
refProgram
- the reference Program objectcheckImage
- if true compare also the image iconoverwrite
- if true update the database object instanceforce
- if true ignores optional propertiesframework
- the current framework
OberonException
fromXML(Element)
public java.lang.String compareSimple(Program refProgram, boolean checkImage) throws OberonException
refProgram
- the reference Program objectcheckImage
- if true compare also the image icon
OberonException
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |