Package com.uc4.communication.requests
Class OpenObject
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.OpenObject
Opens an existing UC4 Object.
-
Constructor Summary
ConstructorsConstructorDescriptionOpenObject(UserListItem user) Opens a user object based on an entry in the user list of the system overview.OpenObject(UC4ObjectName name) Constructs aOpenObjectusing the specified UC4 Object name.OpenObject(UC4ObjectName name, boolean readOnly, boolean fullObject) Constructs aOpenObjectusing the specified UC4 Object name. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.protected UC4ObjectgetObjectForType(String oType, com.uc4.util.XMLDocument doc) Returns a sub class ofUC4Objectfor the specified type.protected StringgetSrc()Returns the request source.getType()Returns the type of the object.Returns a subclass ofUC4Objectornullif the object could not be opened or is not supported.protected voidhandleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.protected booleanprotected booleanThis 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 Details
-
OpenObject
Constructs aOpenObjectusing the specified UC4 Object name. The complete object is returned. The object can be modified.- Parameters:
name- name of the UC4 Object
-
OpenObject
Opens a user object based on an entry in the user list of the system overview.- Parameters:
user- Item of the user list
-
OpenObject
Constructs aOpenObjectusing the specified UC4 Object name. The parameterreadOnlyis used to open the object read only.- Parameters:
name- name of the UC4 ObjectreadOnly-trueif the object should be opened read onlyfullObject-trueif the complete object should be returned.
-
-
Method Details
-
getSrc
Description copied from class:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
getUC4Object
Returns a subclass ofUC4Objectornullif 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
CloseObjectrequest before another OpenObject request will succeed.- Returns:
- subclass of
UC4Object
-
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, Element request, ConnectionAttributes sessionInfo) Description copied from class:XMLRequestCreates the XML Document for the request. This method is used internally.- Specified by:
createRequestin classXMLRequest- Parameters:
doc- Document, used to create new Elementsrequest- Request Element - classes append information to this request elementsessionInfo- Information about the session
-
handleContent
Description copied from class:XMLRequestSub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContentin classXMLRequest- Parameters:
doc- XML Documentsession- Info about the user session
-
getObjectForType
Returns a sub class ofUC4Objectfor the specified type. Sub classes may override this method.- Parameters:
oType- Object type- Returns:
- Instane of UC4Object or
nullif the type is not implemented
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()Description copied from class:XMLRequestThis method is used internally. Tests if thisXMLRequestis allowed in client 0. The default implementation returnsfalse, subclasses may override.- Overrides:
isAllowedInClientZeroin classXMLRequest- Returns:
trueif this request is allowed in client 0,falseotherwise
-
ignoreMessageBox
protected boolean ignoreMessageBox()- Overrides:
ignoreMessageBoxin classXMLRequest
-