Package com.uc4.communication.requests
Class OpenObject
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.OpenObject
-
public class OpenObject extends XMLRequest
Opens an existing UC4 Object.
-
-
Constructor Summary
Constructors Constructor Description OpenObject(UserListItem user)
Opens a user object based on an entry in the user list of the system overview.OpenObject(UC4ObjectName name)
Constructs aOpenObject
using the specified UC4 Object name.OpenObject(UC4ObjectName name, boolean readOnly, boolean fullObject)
Constructs aOpenObject
using the specified UC4 Object name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
Creates the XML Document for the request.protected UC4Object
getObjectForType(java.lang.String oType, com.uc4.util.XMLDocument doc)
Returns a sub class ofUC4Object
for the specified type.protected java.lang.String
getSrc()
Returns the request source.java.lang.String
getType()
Returns the type of the object.UC4Object
getUC4Object()
Returns a subclass ofUC4Object
ornull
if the object could not be opened or is not supported.protected void
handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Sub classes extract the values from the XML document and provide public getter methods.protected boolean
ignoreMessageBox()
protected boolean
isAllowedInClientZero()
This method is used internally.-
Methods inherited from class com.uc4.communication.requests.XMLRequest
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, send, setMessageBox, showQuarantineNotification
-
-
-
-
Constructor Detail
-
OpenObject
public OpenObject(UC4ObjectName name)
Constructs aOpenObject
using the specified UC4 Object name. The complete object is returned. The object can be modified.- Parameters:
name
- name of the UC4 Object
-
OpenObject
public OpenObject(UserListItem user)
Opens a user object based on an entry in the user list of the system overview.- Parameters:
user
- Item of the user list
-
OpenObject
public OpenObject(UC4ObjectName name, boolean readOnly, boolean fullObject)
Constructs aOpenObject
using the specified UC4 Object name. The parameterreadOnly
is used to open the object read only.- Parameters:
name
- name of the UC4 ObjectreadOnly
-true
if the object should be opened read onlyfullObject
-true
if the complete object should be returned.
-
-
Method Detail
-
getSrc
protected java.lang.String getSrc()
Description copied from class:XMLRequest
Returns the request source. This method is used internally.- Specified by:
getSrc
in classXMLRequest
- Returns:
- Source
-
getUC4Object
public UC4Object getUC4Object()
Returns a subclass ofUC4Object
ornull
if the object could not be opened or is not supported.Note: Each object may only be opened once. Subsequent calls to OpenObject will return null here. The object has to be closed with an
CloseObject
request before another OpenObject request will succeed.- Returns:
- subclass of
UC4Object
-
getType
public java.lang.String getType()
Returns the type of the object.- Returns:
- String containing the type of the uc4 object
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
Description copied from class:XMLRequest
Creates the XML Document for the request. This method is used internally.- Specified by:
createRequest
in classXMLRequest
- Parameters:
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the session
-
handleContent
protected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
Description copied from class:XMLRequest
Sub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContent
in classXMLRequest
- Parameters:
doc
- XML Documentsession
- Info about the user session
-
getObjectForType
protected UC4Object getObjectForType(java.lang.String oType, com.uc4.util.XMLDocument doc)
Returns a sub class ofUC4Object
for the specified type. Sub classes may override this method.- Parameters:
oType
- Object type- Returns:
- Instane of UC4Object or
null
if the type is not implemented
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()
Description copied from class:XMLRequest
This method is used internally. Tests if thisXMLRequest
is allowed in client 0. The default implementation returnsfalse
, subclasses may override.- Overrides:
isAllowedInClientZero
in classXMLRequest
- Returns:
true
if this request is allowed in client 0,false
otherwise
-
ignoreMessageBox
protected boolean ignoreMessageBox()
- Overrides:
ignoreMessageBox
in classXMLRequest
-
-