OBEROn SDK

com.oberon.ooql.sdk
Class AdminQuery

java.lang.Object
  extended by com.oberon.ooql.sdk.AdminQuery

public class AdminQuery
extends java.lang.Object

Used to extract administrative objects.
The objects are filtered by (target) type , name and modification date
Results may contains extended informations for the extracted objects or simply the object name list

Version:
5.0

Constructor Summary
AdminQuery()
          Define an administrative object query; the target object type must be set before the query execution
AdminQuery(java.lang.Class<?> objType)
          Define a query for the target (administrative) object type
AdminQuery(java.lang.Class<?> objType, java.lang.String userName)
          Define a query for the target (administrative) object type associated to Users
AdminQuery(java.lang.String objType)
          Define a query for the target (administrative) object type
AdminQuery(java.lang.String objType, java.lang.String userName)
          Define a query for the target (administrative) object type associated to Users
 
Method Summary
 void addPattern(java.lang.String pattern)
          Add a name filter pattern
 void execute(java.io.DataOutputStream outStream, Framework framework)
          Execute a query for administrative objects; uses the previously settled Selector
 void execute(Framework framework)
          Execute a query for administrative objects; uses the previously settled Selector
the result is stored into the target object instance
 void execute(Selector selector, java.io.DataOutputStream outStream, Framework framework)
          Execute a query for administrative objects
 java.lang.String getApplicationPattern()
          Get the application pattern to filter administrative objects
static java.lang.Class<?> getClassForType(java.lang.String typeName)
          Convert the administration type to the related class
 FieldRange getDateRange()
          Get the settled date range to filter administrative object by the modification date
static AdminBase getObjectForType(java.lang.String typeName)
          Convert the administration type the related class object
 java.util.Vector<java.lang.String> getPatterns()
          Get the settled patterns to filter the object names
 java.lang.Class<?> getTargetType()
          Get the target object type for the query
 boolean getTopFilter()
          Get the top filter
 java.lang.String getUser()
          Get the settled User filter
 void setApplicationPattern(java.lang.String pattern)
          Set the application pattern to filter administrative objects
 void setDateRange(FieldRange dateRange)
          Set the date range to filter administrative object by the modification date
 void setPatterns(java.util.Vector<java.lang.String> patterns)
          Set the filter patterns for object names
 void setSelector(Selector selector)
          Set the query selection parameters used to extract additional information from the retrieved objects
 void setTargetType(java.lang.Class<?> objType)
          Define the target (administrative) object type for the query
 void setTopFilter(boolean top)
          Set the top filter: when true extracts only the elements without parents (super is empty)
 void setUser(java.lang.String userName)
          Set the User filter for administrative objects associated to Users (like ObjectGroups, Views etc.)
 java.lang.String toString()
          Return the administrative query properties as a single String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdminQuery

public AdminQuery()
Define an administrative object query; the target object type must be set before the query execution

See Also:
setTargetType(java.lang.Class)

AdminQuery

public AdminQuery(java.lang.String objType)
           throws java.lang.ClassNotFoundException
Define a query for the target (administrative) object type

Parameters:
objType - target object class (example: "field" )
Throws:
java.lang.ClassNotFoundException
Since:
4.0

AdminQuery

public AdminQuery(java.lang.Class<?> objType)
Define a query for the target (administrative) object type

Parameters:
objType - target object class (example: Field.class )

AdminQuery

public AdminQuery(java.lang.Class<?> objType,
                  java.lang.String userName)
Define a query for the target (administrative) object type associated to Users

Parameters:
objType - target object class (example: Field.class )
userName - User filter (default: uses the framework User)

AdminQuery

public AdminQuery(java.lang.String objType,
                  java.lang.String userName)
           throws java.lang.ClassNotFoundException
Define a query for the target (administrative) object type associated to Users

Parameters:
objType - target object class (example: "field" )
userName - User filter (default: uses the framework User)
Throws:
java.lang.ClassNotFoundException
Since:
4.0
Method Detail

getClassForType

public static java.lang.Class<?> getClassForType(java.lang.String typeName)
                                          throws java.lang.ClassNotFoundException
Convert the administration type to the related class

Throws:
java.lang.ClassNotFoundException
Since:
4.0

getObjectForType

public static AdminBase getObjectForType(java.lang.String typeName)
                                  throws java.lang.ClassNotFoundException
Convert the administration type the related class object

Throws:
java.lang.ClassNotFoundException
Since:
4.0

execute

public void execute(java.io.DataOutputStream outStream,
                    Framework framework)
             throws java.io.IOException,
                    OberonException
Execute a query for administrative objects; uses the previously settled Selector

Parameters:
outStream - the stream for the results (if null the result is stored into the framework)
framework - the current framework
Throws:
java.io.IOException - when the output stream return an exception
OberonException - for all other problems
See Also:
Framework.getResult()

execute

public void execute(Selector selector,
                    java.io.DataOutputStream outStream,
                    Framework framework)
             throws java.io.IOException,
                    OberonException
Execute a query for administrative objects

Parameters:
selector - query selection parameters (if null return the found object list)
outStream - the stream for the results (if null the result is stored into the framework)
framework - the current framework
Throws:
java.io.IOException - when the output stream return an exception
OberonException - for all other problems
See Also:
Framework.getResult()

execute

public void execute(Framework framework)
             throws java.io.IOException,
                    OberonException
Execute a query for administrative objects; uses the previously settled Selector
the result is stored into the target object instance

Parameters:
framework - the current framework
Throws:
java.io.IOException - when the output stream return an exception
OberonException - for all other problems
See Also:
Framework.getResult()

setUser

public void setUser(java.lang.String userName)
Set the User filter for administrative objects associated to Users (like ObjectGroups, Views etc.)

Parameters:
userName - the User name filter

getUser

public java.lang.String getUser()
Get the settled User filter

Returns:
the User name filter

setSelector

public void setSelector(Selector selector)
Set the query selection parameters used to extract additional information from the retrieved objects

Parameters:
selector - query selection parameters

addPattern

public void addPattern(java.lang.String pattern)
Add a name filter pattern

Parameters:
pattern - applied to select over object names (can contain wildcards '*' [0/N chars] and '?' [1 char])

setPatterns

public void setPatterns(java.util.Vector<java.lang.String> patterns)
Set the filter patterns for object names

Parameters:
patterns - Vector of pattern Strings
See Also:
addPattern(java.lang.String)

getPatterns

public java.util.Vector<java.lang.String> getPatterns()
Get the settled patterns to filter the object names

Returns:
Vector of pattern Strings

setDateRange

public void setDateRange(FieldRange dateRange)
Set the date range to filter administrative object by the modification date

Parameters:
dateRange - range of dates

getDateRange

public FieldRange getDateRange()
Get the settled date range to filter administrative object by the modification date

Returns:
range of dates

setApplicationPattern

public void setApplicationPattern(java.lang.String pattern)
Set the application pattern to filter administrative objects

Parameters:
pattern - application pattern
Since:
2.2_01

getApplicationPattern

public java.lang.String getApplicationPattern()
Get the application pattern to filter administrative objects

Returns:
the application pattern
Since:
2.2_01

setTopFilter

public void setTopFilter(boolean top)
Set the top filter: when true extracts only the elements without parents (super is empty)

Since:
2.2_04

getTopFilter

public boolean getTopFilter()
Get the top filter

Since:
2.2_04

setTargetType

public void setTargetType(java.lang.Class<?> objType)
Define the target (administrative) object type for the query

Parameters:
objType - target object class (example: Field.class )

getTargetType

public java.lang.Class<?> getTargetType()
Get the target object type for the query

Returns:
target object class instance

toString

public java.lang.String toString()
Return the administrative query properties as a single String

Overrides:
toString in class java.lang.Object

OBEROn SDK

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