Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.portal
Class ServiceController

java.lang.Object
  |
  +--oracle.panama.portal.ServiceController
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AlertController

public class ServiceController
extends java.lang.Object
implements java.io.Serializable

ServiceController handles service related operations, such as retrieving/updating parameters of a service, creating/deleting a service. ServiceController also handles Folder and Bookmark related operations, such as getting the children of a folder or modifying a Bookmark URL.

See Also:
Serialized Form

Field Summary
static java.lang.String BOOKMARKURL
          Key for retrieving bookmark url value from the parameter Hashtable passing to/from the portal pages.
static java.lang.String CHILDRENORDER
          Key for retrieving service sequence value from the parameter Hashtable passing to/from the portal pages.
static java.lang.String CONTAIN
          String constant represents containing condition.
static java.lang.String EQUAL
          String constant represents equal to condition.
static java.lang.String GREATER
          String constant represents greater than condition.
static java.lang.String LESS
          String constant represents less than condition.
static java.lang.String SERVICEFOLDER
          Key for retrieving service folder value from the parameter Hashtable passing to/from the portal pages.
static java.lang.String SERVICENAME
          Key for retrieving service name value from the parameter Hashtable passing to/from the portal pages.
static java.lang.String SORTRULE
          Key for retrieving sort rule value from the parameter Hashtable passing to/from the portal pages.
static java.lang.String VIEWPROFILE
          Key for retrieving bookmark url value from the parameter Hashtable passing to/from the portal pages.
static java.lang.String VISIBLE
          Key for retrieving bookmark url value from the parameter Hashtable passing to/from the portal pages.

 

Method Summary
 Link copyService(java.lang.String name, long serviceId, java.lang.String folderIdString, Request apiRequest)
          copy a service.
 Link copyService(java.lang.String name, long serviceId, java.lang.String folderIdString, java.lang.String profileName, boolean isVisibleVal, Request apiRequest)
          copy a service.
 ExternalLink createNewBookmark(java.lang.String name, java.lang.String url, java.lang.String folderIdString, Request apiRequest)
          create a new bookmark.
 ExternalLink createNewBookmark(java.lang.String name, java.lang.String url, java.lang.String folderIdString, java.lang.String profileName, boolean isVisibleVal, Request apiRequest)
          create a new bookmark.
 Folder createNewFolder(java.lang.String name, java.lang.String folderIdString, Request apiRequest)
          create a new folder.
 Folder createNewFolder(java.lang.String name, java.lang.String folderIdString, java.lang.String profileName, boolean isVisibleVal, Request apiRequest)
          create a new folder.
 void deleteService(long serviceId)
          delete a service.
 Link deployServiceToGroup(long serviceId, java.lang.String groupName, java.lang.String newServiceName, java.lang.String folderIdString, Request apiRequest)
          deploy a service to a group in certain folder
 Link deployServiceToUser(long serviceId, java.lang.String userName, java.lang.String newServiceName, java.lang.String folderIdString, Request apiRequest)
          deploy a service to a user in certain folder
 int getAccessCount(long serviceId, java.lang.String profileName, Request apiRequest)
          Get the access count of the service
 int[] getAllSortRules(Request apiRequest)
          get all of the index values of the SortRules
 Service[] getChildren(long folderId, Request apiRequest)
          Get children array of a folder.
 Service getCurrentService(Request apiRequest)
          get the current requested service.
 java.lang.String getExternalURL(long bookmarkId)
          Get the external URL String of a Bookmark.
 java.util.Hashtable getInputArguments(long serviceId)
          get input argument name-value Hashtable of a MasterService, Service, Alert.
 InputArgument[] getInputArgumentsArray(long serviceId)
          get input arguments array of a MasterService, Service, Alert.
 java.util.Date getLastAccessDate(long serviceId, java.lang.String profileName, Request apiRequest)
          Get the last accessed date of the service
 java.util.Hashtable getOutputArguments(long serviceId)
          get output argument name-(operation, value) Hashtable of a MasterService, Service, Alert.
 OutputArgument[] getOutputArgumentsArray(long serviceId)
          get output argument array of a MasterService, Service, Alert.
 Service[] getRootServices(Request apiRequest)
          get all the root services, folders and bookmarks
 int getSequenceNo(long serviceId, java.lang.String profileName, Request apiRequest)
          Get the sequence number of the service
static ServiceController getServiceInstance()
          The singleton thread-safe getter.
 Service[] getServicePathNodes(Request apiRequest, Service service)
           
 Service[] getSortedChildren(long folderId, SortRule sortRule, java.lang.String profileName, Request apiRequest)
          Get the sorted childres services of the folder
 SortRule getSortRule(long folderId, java.lang.String profileName, Request apiRequest)
          get the SortRule for a Folder
 java.lang.String getSortRuleHeader(SortRule sortRuleObj)
          Get the header string for the given sortRule Object
 java.lang.String[] getSortRuleHeaders()
          Get all of the header strings for the sortRules
 java.lang.String getSortRuleName(SortRule sortRuleObj)
          Get the name for the given sortRule Object
 Service getURLMasterService(Request apiRequest)
          get the URLMasterService from repository
 boolean isBookmark(long objectId)
          check to see whether the object is a Bookmark.
 boolean isFolder(long objectId)
          check to see whether the object is a folder.
 boolean isPresetable(long serviceId)
          check if a Service is presetable
 boolean isQuicklink(long serviceId, java.lang.String name)
          check if a Service Node is a Quicklinked Service
 boolean isVisible(long serviceId, java.lang.String profileName, Request apiRequest)
          check if a Service is visible in the view profile
 void setInputArguments(long serviceId, java.util.Hashtable arguments)
          set input argument values of a MasterService, Service, Alert.
 void setOutputArguments(long serviceId, java.util.Hashtable arguments)
          set output argument filters of a MasterService, Service, Alert.
 void setParameters(long serviceId, java.util.Hashtable parameters, Request apiRequest)
          set parameter values of a service.
 void setSequenceNo(long serviceId, int seqNo, java.lang.String profileName, Request apiRequest)
          Set the sequence number of the service
 void setVisibilityHash(java.util.Hashtable visibilityValueHash)
          set visibility of multiple services.
 void setVisibilityHash(Profile viewProfile, java.util.Hashtable visibilityValueHash)
          set visibility of multiple services for the specified user's view profile.
 void switchFolderState(Request apiRequest, long folderId)
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

SERVICENAME

public static final java.lang.String SERVICENAME
Key for retrieving service name value from the parameter Hashtable passing to/from the portal pages.
See Also:
Constant Field Values

SERVICEFOLDER

public static final java.lang.String SERVICEFOLDER
Key for retrieving service folder value from the parameter Hashtable passing to/from the portal pages.
See Also:
Constant Field Values

CHILDRENORDER

public static final java.lang.String CHILDRENORDER
Key for retrieving service sequence value from the parameter Hashtable passing to/from the portal pages.
See Also:
Constant Field Values

BOOKMARKURL

public static final java.lang.String BOOKMARKURL
Key for retrieving bookmark url value from the parameter Hashtable passing to/from the portal pages.
See Also:
Constant Field Values

VISIBLE

public static final java.lang.String VISIBLE
Key for retrieving bookmark url value from the parameter Hashtable passing to/from the portal pages.
See Also:
Constant Field Values

VIEWPROFILE

public static final java.lang.String VIEWPROFILE
Key for retrieving bookmark url value from the parameter Hashtable passing to/from the portal pages.
See Also:
Constant Field Values

SORTRULE

public static final java.lang.String SORTRULE
Key for retrieving sort rule value from the parameter Hashtable passing to/from the portal pages.
See Also:
Constant Field Values

GREATER

public static final java.lang.String GREATER
String constant represents greater than condition.
See Also:
Constant Field Values

LESS

public static final java.lang.String LESS
String constant represents less than condition.
See Also:
Constant Field Values

EQUAL

public static final java.lang.String EQUAL
String constant represents equal to condition.
See Also:
Constant Field Values

CONTAIN

public static final java.lang.String CONTAIN
String constant represents containing condition.
See Also:
Constant Field Values
Method Detail

getServiceInstance

public static ServiceController getServiceInstance()
The singleton thread-safe getter.
Returns:
the ServiceController singleton interface.

getCurrentService

public Service getCurrentService(Request apiRequest)
get the current requested service. The current service is the serivce identified by the PAoid value in the request url.
Parameters:
apiRequest - current validated Request.
Returns:
the current requested Service

getChildren

public Service[] getChildren(long folderId,
Request apiRequest)
                      throws PortalException
Get children array of a folder.
Parameters:
folderId - queried folder ID.
apiRequest - current validate Request.
Returns:
children array if the service is a folder or its final service is a folder, null if it not.
PortalException

isFolder

public boolean isFolder(long objectId)
check to see whether the object is a folder.
Parameters:
objectId - queried object ID.
Returns:
true if the service or its final service is a folder.

isBookmark

public boolean isBookmark(long objectId)
check to see whether the object is a Bookmark.
Parameters:
objectId - queried object ID.
Returns:
true if the service or its final service is a bookmark.

setVisibilityHash

public void setVisibilityHash(java.util.Hashtable visibilityValueHash)
                       throws PortalException
set visibility of multiple services.
Parameters:
visibilityValueHash - -- String-Boolean value pairs, for each one, String value is the service id, while Boolean value is the true/false value for visibility
PortalException

setVisibilityHash

public void setVisibilityHash(Profile viewProfile,
                              java.util.Hashtable visibilityValueHash)
                       throws PortalException
set visibility of multiple services for the specified user's view profile.
Parameters:
viewProfile - user's view profile object
visibilityValueHash - -- String-Boolean value pairs, for each one, String value is the service id, while Boolean value is the true/false value for visibility
PortalException

getExternalURL

public java.lang.String getExternalURL(long bookmarkId)
                                throws PortalException
Get the external URL String of a Bookmark.
Parameters:
bookmarkId - the queried Bookmark ID.
Returns:
external url String the service or its final service is a bookmark, null if it is not.
PortalException

getInputArguments

public java.util.Hashtable getInputArguments(long serviceId)
                                      throws PortalException
get input argument name-value Hashtable of a MasterService, Service, Alert.
Parameters:
serviceId - queried service ID.
Returns:
input argument name-value Hashtable of the service
PortalException

getInputArgumentsArray

public InputArgument[] getInputArgumentsArray(long serviceId)
                                       throws PortalException
get input arguments array of a MasterService, Service, Alert.
Parameters:
serviceId - queried service ID.
Returns:
input argument array
PortalException

getOutputArguments

public java.util.Hashtable getOutputArguments(long serviceId)
                                       throws PortalException
get output argument name-(operation, value) Hashtable of a MasterService, Service, Alert. Each (operation, value) object is also a Hashtable of operation-value filters
Parameters:
serviceId - queried service ID.
Returns:
output argument name-(operation,value) Hashtable of the service
PortalException

getOutputArgumentsArray

public OutputArgument[] getOutputArgumentsArray(long serviceId)
                                         throws PortalException
get output argument array of a MasterService, Service, Alert.
Parameters:
serviceId - queried service ID.
Returns:
output argument array of the service
PortalException

deleteService

public void deleteService(long serviceId)
                   throws PortalException
delete a service.
Parameters:
serviceId - deleted service ID.
PortalException

setParameters

public void setParameters(long serviceId,
                          java.util.Hashtable parameters,
Request apiRequest)
                   throws PortalException
set parameter values of a service.
Parameters:
serviceId - queried service ID.
parameters - parameter name-value Hashtable to update
PortalException

setInputArguments

public void setInputArguments(long serviceId,
                              java.util.Hashtable arguments)
                       throws PortalException
set input argument values of a MasterService, Service, Alert.
Parameters:
arguments - argument name-value Hashtable to update
PortalException

setOutputArguments

public void setOutputArguments(long serviceId,
                               java.util.Hashtable arguments)
                        throws PortalException
set output argument filters of a MasterService, Service, Alert.
Parameters:
arguments - argument name-(operation-value) Hashtable to update. Each (operation, value) object is also a Hashtable of operation-value filters.
PortalException

copyService

public Link copyService(java.lang.String name,
                        long serviceId,
                        java.lang.String folderIdString,
Request apiRequest)
                 throws PortalException
copy a service.
Parameters:
name - new service name.
folderIdString - the containing folder id string.
apiRequest - current validated Request.
Returns:
the new Service.
PortalException

copyService

public Link copyService(java.lang.String name,
                        long serviceId,
                        java.lang.String folderIdString,
                        java.lang.String profileName,
                        boolean isVisibleVal,
Request apiRequest)
                 throws PortalException
copy a service.
Parameters:
name - new service name.
folderIdString - the containing folder id string.
profileName - the current user's view profile.
isVisibleVal - the visibility value of the new service.
apiRequest - current validated Request.
Returns:
the new Service.
PortalException

createNewFolder

public Folder createNewFolder(java.lang.String name,
                              java.lang.String folderIdString,
Request apiRequest)
                       throws PortalException
create a new folder.
Parameters:
name - new folder name.
folderIdString - the containing folder id string.
apiRequest - current validated Request.
Returns:
the new Folder.
PortalException

createNewFolder

public Folder createNewFolder(java.lang.String name,
                              java.lang.String folderIdString,
                              java.lang.String profileName,
                              boolean isVisibleVal,
Request apiRequest)
                       throws PortalException
create a new folder.
Parameters:
name - new folder name.
folderIdString - the containing folder id string.
profileName - the current user's view profile.
isVisibleVal - the visibility value of the new service.
apiRequest - current validated Request.
Returns:
the new Folder.
PortalException

createNewBookmark

public ExternalLink createNewBookmark(java.lang.String name,
                                      java.lang.String url,
                                      java.lang.String folderIdString,
Request apiRequest)
                               throws PortalException
create a new bookmark.
Parameters:
name - new bookmark name.
url - the url string of the new bookmark.
folderIdString - the containing folder id string.
apiRequest - current validated Request.
Returns:
the new Bookmark.
PortalException

createNewBookmark

public ExternalLink createNewBookmark(java.lang.String name,
                                      java.lang.String url,
                                      java.lang.String folderIdString,
                                      java.lang.String profileName,
                                      boolean isVisibleVal,
Request apiRequest)
                               throws PortalException
create a new bookmark.
Parameters:
name - new bookmark name.
url - the url string of the new bookmark.
folderIdString - the containing folder id string.
profileName - the current user's view profile.
isVisibleVal - the visibility value of the new service.
apiRequest - current validated Request.
Returns:
the new Bookmark.
PortalException

getRootServices

public Service[] getRootServices(Request apiRequest)
                          throws PortalException
get all the root services, folders and bookmarks
Parameters:
apiRequest - current validated request
Returns:
root service array
PortalException

getURLMasterService

public Service getURLMasterService(Request apiRequest)
                            throws PortalException
get the URLMasterService from repository
Parameters:
apiRequest - current validated Request.
Returns:
the current requested Service
PortalException

deployServiceToUser

public Link deployServiceToUser(long serviceId,
                                java.lang.String userName,
                                java.lang.String newServiceName,
                                java.lang.String folderIdString,
Request apiRequest)
                         throws PortalException
deploy a service to a user in certain folder
Parameters:
userName - the user name to deploy to
newServiceName - the new name for the deployed service
folderIdString - the folder to deployed to
apiRequest - current validated Request.
Returns:
the current requested Service
PortalException

deployServiceToGroup

public Link deployServiceToGroup(long serviceId,
                                 java.lang.String groupName,
                                 java.lang.String newServiceName,
                                 java.lang.String folderIdString,
Request apiRequest)
                          throws PortalException
deploy a service to a group in certain folder
Parameters:
groupName - the group name to deploy to
newServiceName - the new name for the deployed service
folderIdString - the folder to deployed to
apiRequest - current validated Request.
Returns:
the current requested Service
PortalException

isPresetable

public boolean isPresetable(long serviceId)
check if a Service is presetable
Parameters:
serviceId - queried service ID.
Returns:
true if the service contains presetable input arguments, false otherwise.

isQuicklink

public boolean isQuicklink(long serviceId,
                           java.lang.String name)
check if a Service Node is a Quicklinked Service
Parameters:
serviceId - queried service ID.
name - service name
Returns:
true if it is a Quicklinked Service, false otherwise.

isVisible

public boolean isVisible(long serviceId,
                         java.lang.String profileName,
Request apiRequest)
                  throws PortalException
check if a Service is visible in the view profile
Parameters:
serviceId - queried service ID.
profileName - queried user's view profile name.
apiRequest - current validated request.
Returns:
true if the service is visible, false otherwise.
PortalException

getSortRule

public SortRule getSortRule(long folderId,
                            java.lang.String profileName,
Request apiRequest)
                     throws PortalException
get the SortRule for a Folder
Parameters:
folderId - queried folder ID.
profileName - queried user view profile name.
apiRequest - current validated Request.
Returns:
SortRule.
PortalException

getAllSortRules

public int[] getAllSortRules(Request apiRequest)
                      throws PortalException
get all of the index values of the SortRules
Parameters:
apiRequest - current validated Request.
Returns:
SortRule.
PortalException

getSortRuleHeader

public java.lang.String getSortRuleHeader(SortRule sortRuleObj)
Get the header string for the given sortRule Object
Parameters:
sortRuleObj - sortRule Object
Returns:
String value for the header

getSortRuleName

public java.lang.String getSortRuleName(SortRule sortRuleObj)
Get the name for the given sortRule Object
Parameters:
sortRuleObj - sortRule Object
Returns:
String value for name

getSortRuleHeaders

public java.lang.String[] getSortRuleHeaders()
Get all of the header strings for the sortRules
Returns:
array of String values for the header

getSortedChildren

public Service[] getSortedChildren(long folderId,
SortRule sortRule,
                                   java.lang.String profileName,
Request apiRequest)
                            throws PortalException
Get the sorted childres services of the folder
Parameters:
folderId - the queried folder id
sortRule - sort the children with this sort rule
profileName - the user's view profile name
apiRequest - current validated Request.
Returns:
the sorted childres services of the folder
PortalException

getAccessCount

public int getAccessCount(long serviceId,
                          java.lang.String profileName,
Request apiRequest)
                   throws PortalException
Get the access count of the service
Parameters:
serviceId - the queried service id
profileName - the user's view profile name
apiRequest - current validated Request.
Returns:
the access count of the service
PortalException

getLastAccessDate

public java.util.Date getLastAccessDate(long serviceId,
                                        java.lang.String profileName,
Request apiRequest)
                                 throws PortalException
Get the last accessed date of the service
Parameters:
serviceId - the queried service id
profileName - the user's view profile name
apiRequest - current validated Request.
Returns:
the accessed date of the service
PortalException

getSequenceNo

public int getSequenceNo(long serviceId,
                         java.lang.String profileName,
Request apiRequest)
                  throws PortalException
Get the sequence number of the service
Parameters:
serviceId - the queried service id
profileName - the user's view profile name
apiRequest - current validated Request.
Returns:
the sequence number of the service
PortalException

setSequenceNo

public void setSequenceNo(long serviceId,
                          int seqNo,
                          java.lang.String profileName,
Request apiRequest)
                   throws PortalException
Set the sequence number of the service
Parameters:
serviceId - the queried service id
seqNo - the sequence number
profileName - the user's view profile name
apiRequest - current validated Request.
PortalException

switchFolderState

public void switchFolderState(Request apiRequest,
                              long folderId)
                       throws PortalException
PortalException

getServicePathNodes

public Service[] getServicePathNodes(Request apiRequest,
Service service)

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.