Oracle Secure Global Desktop Web Services API Documentation
Release 4.7

E21396-02

com.tarantella.tta.webservices.client.views
Class WebtopViewBean

java.lang.Object
  extended by java.util.Observable
      extended by com.tarantella.tta.webservices.client.views.WebtopViewBean
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CombinedView

public class WebtopViewBean
extends java.util.Observable

The class maintains a view of assigned applications. The applications can be flattened to one-level or maintained in groups. Groups either reflect the hierarchy of groups in the datastore or are set through a user's personal settings.

See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_ENABLED
          Name of the attribute that marks an assigned application or group as enabled.
static java.lang.String ATTR_HIDDEN
          Name of the attribute that marks an assigned application or group as hidden.
static java.lang.String ATTR_OPEN
          Name of the attribute that marks an assigned application or group as open.
static java.lang.String EVENT_TOGGLE_GROUP
          Name of the event action that toggles the open/closed state of an assigned applications item or group.
static java.lang.String VALUE_CLOSED
          Attribute value that marks an assigned application or group as closed.
static java.lang.String VALUE_OPEN
          Attribute value that marks an assigned application or group as open.
static java.lang.String VALUE_TRUE
          Value for boolean attributes that are true.
 
Method Summary
 void generateView(java.lang.String searchSpec, java.lang.String[] attributes, boolean forceRefresh, WebtopGroupContainer groupings)
          Generates and caches a flat view of assigned applications.
 void generateViewHierarchy(java.lang.String searchSpec, java.lang.String[] attributes, java.lang.String[] groups, boolean forceRefresh, WebtopGroupContainer groupings)
          Generates and caches a hierarchical view of assigned applications.
 java.lang.String getAbsoluteURL(IResponse obj)
          Gets the absolute URL of an SGD document.
 int getApplicationCount()
          Gets the number of applications and documents assigned.
 java.lang.String getDocumentBase()
          Gets the document base for resolving relative URLs of SGD documents.
 int getInstancesRemaining(IResponse object)
          Gets the number of remaining application sessions that can be launched for this application.
 WSObject getObject(java.lang.String objName)
          Gets a webtop object.
 java.util.Enumeration<IResponse> getSortedEnumeration(java.util.Enumeration enm, java.lang.String attName)
          Gets an enumeration of IResponse objects, sorted by the value of the attribute.
 java.util.ArrayList<WSObject> getSortedWebtopObjects()
          Returns a list of the assigned applications.
 java.util.Enumeration getSortedWebtopViewEnumeration(java.lang.String itemSortAttr, java.lang.String groupSortAttr, boolean ascending, boolean groupsFirst)
          Returns a sorted enumeration over the assigned applications.
 java.util.Enumeration getWebtopEnumeration()
          Returns a sorted enumeration over the assigned applications.
 java.util.ArrayList<WSObject> getWebtopObjects()
          Returns a list of the assigned applications.
 java.util.Enumeration getWebtopViewEnumeration()
          Returns an enumeration over the assigned applications.
 boolean hasDynamicHost(IResponse object)
          Tests if the object has a dynamic host.
 boolean isApplication(IResponse object)
          Tests if the object is an application or document.
 boolean isDocument(IResponse object)
          Tests if the object is a document.
 boolean isDynamicApplication(IResponse object)
          Tests if the object is a dynamic application.
 boolean isEnabled(IResponse object)
          Tests if the object is an application or document that should be enabled.
 boolean isGroup(IResponse object)
          Tests if the object is a group.
 boolean isInNewBrowserWindow(IResponse object)
          Tests if the object is a document that should be launched in a new browser window.
 boolean isInPlace(IResponse object)
          Tests if the object is a document that should be launched in-place.
 boolean isVisible(IResponse object)
          Tests if the object should be displayed.
 java.lang.String lookupFullName(java.lang.String hashName)
          Looks up the full name based on the hash name.
 java.lang.String lookupWebtopItems(java.lang.String[] objectNames, java.lang.String[] desiredAttributes)
          Looks-up assigned applications.
 boolean processEvent(java.lang.String eventName, java.lang.String eventAction, java.lang.String eventData)
          Processes events affecting this view.
 java.lang.String searchWebtopContent(java.lang.String searchSpec, java.lang.String[] desiredAttributes)
          Searches for assigned applications, flattening any grouping structure defined in the datastore.
 java.lang.String searchWebtopContentHierarchy(java.lang.String searchSpec, java.lang.String[] desiredAttributes, java.lang.String[] groups)
          Searches for assigned applications, preserving any grouping structure defined in the datastore.
 void setDocumentBase(java.lang.String docBase)
          Sets the document base for resolving relative URLs of SGD documents.
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_TOGGLE_GROUP

public static final java.lang.String EVENT_TOGGLE_GROUP
Name of the event action that toggles the open/closed state of an assigned applications item or group.

See Also:
Constant Field Values

ATTR_ENABLED

public static final java.lang.String ATTR_ENABLED
Name of the attribute that marks an assigned application or group as enabled. An enabled assigned applications item can be used to launch application sessions.

See Also:
Constant Field Values

ATTR_OPEN

public static final java.lang.String ATTR_OPEN
Name of the attribute that marks an assigned application or group as open. Children of open items and groups should be shown.

See Also:
Constant Field Values

VALUE_OPEN

public static final java.lang.String VALUE_OPEN
Attribute value that marks an assigned application or group as open. Children of open items and groups should be shown.

See Also:
Constant Field Values

VALUE_CLOSED

public static final java.lang.String VALUE_CLOSED
Attribute value that marks an assigned application or group as closed. Children of closed items and groups should not be shown.

See Also:
Constant Field Values

ATTR_HIDDEN

public static final java.lang.String ATTR_HIDDEN
Name of the attribute that marks an assigned application or group as hidden. Children of hidden items and groups should not be shown.

See Also:
Constant Field Values

VALUE_TRUE

public static final java.lang.String VALUE_TRUE
Value for boolean attributes that are true.

See Also:
Constant Field Values
Method Detail

isApplication

public boolean isApplication(IResponse object)
Tests if the object is an application or document.

Parameters:
object - Assigned application object
Returns:
trueif the object is an application or document
falseif the object is not an application or document
Since:
1.0

isDynamicApplication

public boolean isDynamicApplication(IResponse object)
Tests if the object is a dynamic application.

Parameters:
object - Assigned application object
Returns:
trueif the object is a dynamic application
falseif the object is not a dynamic application

isDocument

public boolean isDocument(IResponse object)
Tests if the object is a document.

Parameters:
object - Assigned application object
Returns:
trueif the object is a document
falseif the object is not a document
Since:
1.0

isGroup

public boolean isGroup(IResponse object)
Tests if the object is a group.

Parameters:
object - Assigned application object
Returns:
trueif the object is a group
falseif the object is not a group
Since:
1.0

isInPlace

public boolean isInPlace(IResponse object)
Tests if the object is a document that should be launched in-place. in-place means in the display frame of the standard frameset.

Parameters:
object - Assigned application object
Returns:
trueif the object is a document that should be launched in-place
falseif the object is not a document, or if it should be launched elsewhere
Since:
1.0

isInNewBrowserWindow

public boolean isInNewBrowserWindow(IResponse object)
Tests if the object is a document that should be launched in a new browser window.

Parameters:
object - Assigned application object
Returns:
trueif the object is a document that should be launched in a new browser window
falseif the object is not a document, or if it should not be launched in a new browser window
Since:
1.0

isEnabled

public boolean isEnabled(IResponse object)
Tests if the object is an application or document that should be enabled. enabled means in that more launches are possible for the application or document.

Parameters:
object - Assigned application object
Returns:
trueif the object is an application or document that is enabled
falseif the object is not an application or group, or if it not enabled
Since:
1.0

hasDynamicHost

public boolean hasDynamicHost(IResponse object)
Tests if the object has a dynamic host.

Parameters:
object - Assigned application object
Returns:
trueif the object has a dynamic host
falseif the object has a dynamic host

getInstancesRemaining

public int getInstancesRemaining(IResponse object)
Gets the number of remaining application sessions that can be launched for this application.

Parameters:
object - Application object
Returns:
-1: unlimited application sessions may be launched, or
the number of additional application sessions that may be launched
Since:
1.0

lookupWebtopItems

public java.lang.String lookupWebtopItems(java.lang.String[] objectNames,
                                          java.lang.String[] desiredAttributes)
                                   throws java.rmi.RemoteException
Looks-up assigned applications. The applications in the response are not cached - use generateView(String, String[], boolean, WebtopGroupContainer) to cache responses.

Parameters:
objectNames - Array of assigned application object names.
desiredAttributes - Attributes desired in the response.
Returns:
See ITarantellaWebtopContent.lookupWebtopItems(String, String[], String[])
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

searchWebtopContent

public java.lang.String searchWebtopContent(java.lang.String searchSpec,
                                            java.lang.String[] desiredAttributes)
                                     throws java.rmi.RemoteException
Searches for assigned applications, flattening any grouping structure defined in the datastore. The applications in the response are not cached - use generateView(String, String[], boolean, WebtopGroupContainer) to cache responses.

Parameters:
searchSpec - Specification controlling the search.
desiredAttributes - Attributes desired in the response.
Returns:
See ITarantellaWebtopContent.searchWebtopContent(String, String, String[])
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

searchWebtopContentHierarchy

public java.lang.String searchWebtopContentHierarchy(java.lang.String searchSpec,
                                                     java.lang.String[] desiredAttributes,
                                                     java.lang.String[] groups)
                                              throws java.rmi.RemoteException
Searches for assigned applications, preserving any grouping structure defined in the datastore. The applications in the response are not cached - use generateViewHierarchy(String, String[], String[], boolean, WebtopGroupContainer) to cache responses.

Parameters:
searchSpec - Specification controlling the search.
desiredAttributes - Attributes desired in the response.
groups - Array of groups whose assigned applications are desired.
Returns:
See ITarantellaWebtopContent.searchWebtopContentHierarchy(String, String, String[], String[])
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

isVisible

public boolean isVisible(IResponse object)
Tests if the object should be displayed. An object is deemed as displayable if its parent and all ancestors should be displayed.

Parameters:
object - Assigned application object
Returns:
trueif the object should be displayed
falseif the object should not be displayed
Since:
1.0

processEvent

public boolean processEvent(java.lang.String eventName,
                            java.lang.String eventAction,
                            java.lang.String eventData)
                     throws java.rmi.RemoteException
Processes events affecting this view. If the view is unable to process the event, the local cache may be invalid. It is the responsibility of the caller to refresh the cache in these circumstances.

Parameters:
eventName - Name of the event. Supported events are:
IConstants.WEBTOP_CHANGED_EVT Fired when the assigned applications have changed
IConstants.WEBTOP_STATE_EVT Fired when the state of existing assigned applications has changed
eventAction - Event action. Supported actions are:
IConstants.ACTION_OBJECT_CREATED An object has been created.
IConstants.ACTION_OBJECT_DELETED An object has been deleted.
IConstants.ACTION_OBJECT_DISABLED An object has been disabled.
IConstants.ACTION_OBJECT_ENABLED An object has been enabled.
IConstants.ACTION_VIEW_REFRESH Update the view.
EVENT_TOGGLE_GROUP Toggle the open/close state of a group.
eventData - Event data, for example, the name of the assigned application. A value of IConstants.EVT_REFRESH will cause the method to return false
Returns:
trueif the event was processed and the view updated
falseif the event was not processed, possibly leaving the view invalid
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

generateView

public void generateView(java.lang.String searchSpec,
                         java.lang.String[] attributes,
                         boolean forceRefresh,
                         WebtopGroupContainer groupings)
                  throws java.rmi.RemoteException
Generates and caches a flat view of assigned applications. Any groupings in the datastore are removed and assigned applications are flattened to one level.

Parameters:
searchSpec - RFC 2254 search specification to select matching assigned applications
attributes - The attributes desired in the response
forceRefresh - Flag controlling how the request is serviced.
true request must be sent to the server
false request may be serviced from the cached view
groupings - The groupings to apply to the assigned applications
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

generateViewHierarchy

public void generateViewHierarchy(java.lang.String searchSpec,
                                  java.lang.String[] attributes,
                                  java.lang.String[] groups,
                                  boolean forceRefresh,
                                  WebtopGroupContainer groupings)
                           throws java.rmi.RemoteException
Generates and caches a hierarchical view of assigned applications. Groupings in the datastore are preserved.

Parameters:
searchSpec - RFC 2254 search specification to select matching assigned applications
attributes - The attributes desired in the response
groups - The groups to be included in the response. Use IConstants.TOP to get the top-level group.
forceRefresh - Flag controlling how the request is serviced.
true request must be sent to the server
false request may be serviced from the cached view
groupings - The groupings to apply to the assigned applications
Throws:
java.rmi.RemoteException - On receipt of a SOAP fault.
Since:
1.0

getWebtopViewEnumeration

public java.util.Enumeration getWebtopViewEnumeration()
Returns an enumeration over the assigned applications. The assigned applications are not sorted.

Returns:
An enumeration of the view of assigned applications.
Since:
1.0

getWebtopObjects

public java.util.ArrayList<WSObject> getWebtopObjects()
Returns a list of the assigned applications. The assigned applications are not sorted.

Returns:
A list of assigned applications.
Since:
1.1

getObject

public WSObject getObject(java.lang.String objName)
Gets a webtop object.

Parameters:
objName - Name of the object.
Returns:
A webtop object or null if it does not exist.
Since:
1.1

getWebtopEnumeration

public java.util.Enumeration getWebtopEnumeration()
Returns a sorted enumeration over the assigned applications. The assigned applications are sorted with groups before applications, both alphabetically ascending.

Returns:
An enumeration of the model of assigned applications.
Since:
1.0

getSortedWebtopObjects

public java.util.ArrayList<WSObject> getSortedWebtopObjects()
Returns a list of the assigned applications. The assigned applications are sorted with groups before applications, both alphabetically ascending.

Returns:
A list of assigned applications.
Since:
1.1

getSortedWebtopViewEnumeration

public java.util.Enumeration getSortedWebtopViewEnumeration(java.lang.String itemSortAttr,
                                                            java.lang.String groupSortAttr,
                                                            boolean ascending,
                                                            boolean groupsFirst)
Returns a sorted enumeration over the assigned applications.

Parameters:
itemSortAttr - Name of the attribute on which assigned applications are sorted
groupSortAttr - Name of the attribute on which groups are sorted
ascending - Flag controlling sort order:
trueorder is alphabetically ascending
falseorder is alphabetically descending
groupsFirst - Flag controlling item/group ordering within a level:
truegroups precede items
falsegroups follow items
Returns:
An sorted enumeration of the view of assigned applications.
Since:
1.0

getApplicationCount

public int getApplicationCount()
Gets the number of applications and documents assigned.

Returns:
the number of applications and documents
Since:
1.0

getDocumentBase

public java.lang.String getDocumentBase()
Gets the document base for resolving relative URLs of SGD documents. This must be set with a call to setDocumentBase(String).

Returns:
The document base.
Since:
1.1

setDocumentBase

public void setDocumentBase(java.lang.String docBase)
Sets the document base for resolving relative URLs of SGD documents. This should be the URL to the SGD server.

Parameters:
docBase - The document base.
Since:
1.1

getAbsoluteURL

public java.lang.String getAbsoluteURL(IResponse obj)
Gets the absolute URL of an SGD document. To resolve relative URLs, the document base must have been set with a call to setDocumentBase(String).

Parameters:
obj - The document object.
Returns:
The absolute URL.
Since:
1.1

lookupFullName

public java.lang.String lookupFullName(java.lang.String hashName)
Looks up the full name based on the hash name.

Parameters:
hashName - The hash name of the object.
Returns:
The full name of the object.
Since:
1.1

getSortedEnumeration

public java.util.Enumeration<IResponse> getSortedEnumeration(java.util.Enumeration enm,
                                                             java.lang.String attName)
Gets an enumeration of IResponse objects, sorted by the value of the attribute.

Parameters:
enm - Initial enumeration
attName - Name of the attribute on which to sort
Returns:
The sorted enumeration.
Since:
1.3

Oracle Secure Global Desktop Web Services API Documentation
Release 4.7

E21396-02

Copyright © 2012, 2013, Oracle and/or its affiliates. All rights reserved.