com.waveset.ui
Class FormUtil

java.lang.Object
  extended by com.waveset.ui.FormUtil

public class FormUtil
extends java.lang.Object

This class provides a collection of utility methods that are intended to be called from XPRESS expressions with Form objects. They can be used to populate lists of allowed values, validate input, etc.


Nested Class Summary
static class FormUtil.StringComparator
          Internal class that implenents the Comparator interface for sorting the object names.
 
Field Summary
static java.lang.String code_id
           
 
Constructor Summary
FormUtil()
           
 
Method Summary
static java.lang.String buildDn(java.lang.String name, java.lang.String baseContext)
          Takes a names and the baseContext to append to the name.
static java.util.List buildDns(java.util.List names, java.lang.String baseContext)
          Takes a list of names and the baseContext to append to each token in the list.
static java.util.List buildDns(java.lang.String names, java.lang.String delimeter, java.lang.String baseContext)
          Takes a string, the delimeter with which to parse the string, and the baseContext to append to each token in the string.
static java.lang.Object callResourceMethod(LighthouseContext context, java.lang.String resourceName, java.lang.String methodName, java.util.Map args)
          This method will invoke the specified method on the specified resource, passing the given Map of arguments into the method, if the current subject has view access to the specified resource.
static GenericObject callWebService(LighthouseContext ctx, java.lang.String action, java.lang.String objectType, java.lang.String delegatingResourceName, java.lang.String resourceName, GenericObject parameters)
          This method will call a web service on a WebServiceResourceAdapter
static java.lang.Object checkStringQualityPolicy(LighthouseContext s, java.lang.String policy, java.lang.Object value, java.util.Map map, java.util.List pwdhistory, java.lang.String owner)
          Check string value against string policy Return true if string passes policy tests or error msg(s) if fails Add option returnNull=true to map and a success will return null.
static void clearResourceObjectListCache(LighthouseContext session, java.util.Map<java.lang.String,java.lang.Object> options)
          Variant that takes an options map.
static void clearResourceObjectListCache(LighthouseContext session, java.lang.String objectType, java.util.List resourceList)
          Variant that takes a list of resourceids and an existing session
static void clearResourceObjectListCache(LighthouseContext session, java.lang.String objectType, java.lang.String resourceId)
          Variant that takes a single resourceid and an existing session.
static void clearResourceObjectListCache(LighthouseContext session, java.lang.String objectType, java.lang.String resourceId, java.util.Map templateParameters)
          Variant that takes a single resourceid (supporting resource templates) and an existing session.
static void clearResourceObjectListCache(java.lang.String subjectString, java.util.Map<java.lang.String,java.lang.Object> options)
          Variant that takes an options map.
static void clearResourceObjectListCache(java.lang.String subjectString, java.lang.String objectType, java.util.List resourceList)
          Variant that takes a list of resourceids and a subject string
static void clearResourceObjectListCache(java.lang.String subjectString, java.lang.String objectType, java.lang.String resourceId)
          Variant that takes a single resourceId and a subject string.
static void clearResourceObjectListCache(java.lang.String subjectString, java.lang.String objectType, java.lang.String resourceId, java.util.Map templateParameters)
          Variant that takes a single resourceid (supporting resource templates) and a subject string.
static java.lang.Boolean controlsAtLeastOneOrganization(LighthouseContext s, java.util.List organizations)
          This method will return true if the current authenticated Lighthouse user controls any one of the organizations in the list; otherwise, returns false.
static java.lang.String convertDateToString(java.util.Date date, java.lang.String simpleDateFormatPattern)
          Convert a date into a different date into the requested string format.
static java.lang.String convertDateToString(java.lang.String dateStr, java.lang.String simpleDateFormatPattern)
          Convert the string representation for a date into a different date string format.
static java.util.List<java.lang.String> convertListGenObjToStr(java.lang.String format, java.lang.String delim, java.util.List<GenericObject> genObjList)
          Convert a list of GenericObject to a list of delimited strings.
static java.util.List<java.lang.String> convertListGenObjToStr(java.lang.String format, java.lang.String delim, java.util.List<GenericObject> genObjList, java.lang.String dateFormat)
          Convert a list of GenericObject that can contain dates to a list of delimited strings.
static java.util.List<GenericObject> convertListStrToGenObj(java.lang.String format, java.lang.String delim, java.util.List<java.lang.String> strList)
          Convert a list of delimited strings to a list of generic objects.
static java.util.List<GenericObject> convertListStrToGenObj(java.lang.String format, java.lang.String delim, java.lang.String str)
          Convert a delimited String to a List of GenericObjects
static int countObjects(LighthouseContext s, java.lang.String typeName, java.util.Map options)
          Count objects of specified type.
static java.util.Date findRoleEventDate(java.util.List roleInfos, java.util.Map options)
          Searches for an event date in a list of role info generic objects using the options specified.
static java.lang.String formatDate(java.lang.String src)
          Given a string containing the long integer representation of a Date, return a formatted date string.
static java.lang.String formatTransactionText(java.util.Locale locale, java.util.List attrNames, java.util.List attrValues)
          Used for formatting the transaction text to be signed for signed approvals.
static java.lang.String getAccountAttributeType(LighthouseContext session, java.lang.String fqAttrName)
          Returns the 'type' of an attribute
static java.util.List getAdministrators(LighthouseContext lc)
          Return a string array of Administrator names
static java.util.List getAdminRoles(LighthouseContext s, java.util.Map options)
          Returns a list of capabilities in the authorization scope of the specified lighthouse context.
static java.util.List getApplications(LighthouseContext s, java.util.Map options)
          Returns a list of applications in the authorization scope of the specified lighthouse context.
static java.util.Map getAttributesSelectOptionGroupMap(LighthouseContext s)
          Builds data structure appropriate for the 'optionsGroupMap' property of a Select component that displays all form and resource attributes.
static java.util.Map getAttributesSelectOptionGroupMap(LighthouseContext s, java.util.Map additionalEntries, java.lang.String additionalEntriesMsg)
          Builds data structure appropriate for the 'optionsGroupMap' property of a Select component that displays resource attributes.
static java.util.Map getAttributesSelectValueMap(LighthouseContext s)
          Builds data structure appropriate for the 'valueMap' property of a Select component that displays all form and resource attributes.
static java.util.List getAuditActions(LighthouseContext s, java.lang.String objectType)
          Get a list of audit actions available to the given content for the objectType.
static java.util.List getAuditActions(LighthouseContext s, java.lang.String objectType, boolean includeAll)
           
static java.util.Map getAuditFormatterMap(LighthouseContext context)
           
static java.util.List getAuditObjectTypes(LighthouseContext s)
          Get a list of audit object types available to the given context.
static java.util.Map getAuditPublisherMap(LighthouseContext context)
           
static java.util.List getAuditPublisherOptions(java.lang.String className)
           
static java.util.List getAuditStatusList(LighthouseContext s)
          Get a list of audit status types available to the given context.
static java.util.List getAuditStatusList(LighthouseContext s, boolean includeAll)
           
static java.util.Map getAvailableCharsets()
           
static java.util.List<java.lang.String> getAvailableDataOrGatewayCipherNames(com.waveset.session.Session displaySession)
           
static java.util.List<java.lang.String> getAvailableDataOrGatewayCiphers(com.waveset.session.Session displaySession)
           
static java.util.List<java.lang.String> getAvailableEncryptionKeyCipherNames(com.waveset.session.Session displaySession)
           
static java.util.List<java.lang.String> getAvailableEncryptionKeyCiphers(com.waveset.session.Session displaySession)
           
static java.util.List getAvailablePDFFonts()
           
static java.util.List getCapabilities(LighthouseContext s, java.util.Map options)
          Returns a list of capabilities in the authorization scope of the specified lighthouse context.
static java.lang.String getCodeIdVersion(java.lang.Class clazz)
          Get the version of the code id from the class.
static java.lang.String getCodeIdVersion(java.lang.String clazz)
          Get the version of the code id from the class.
static java.util.List<java.lang.String> getComplexFormat(java.lang.String str, java.lang.String delim)
          This method converts a delimited string into a list of the delimited components.
static GenericObject getConfigExtension(com.waveset.object.ObjectRef objectRef)
          Returns the extension within a Configuration object, expecting that extension to be a GenericObject.
static java.util.Map getConfigExtensionMap(java.util.List configObjectRefs)
          Takes a list of ObjectRefs that are expected to be References to Configuration objects that contain an extension which is a generic object with a "name" attribute.
static java.lang.String getCurrentObjectEncryption()
           
static java.lang.String getCurrentServerKeyEncryption()
           
static java.util.Locale getDisplayLocale(com.waveset.session.Session session)
          Extract the locale from the session.
static java.lang.String getDnComponent(java.lang.String dn, java.lang.String componentName)
          Given a dn's and the component type to return (e.g.
static java.util.List getEndUserResources(LighthouseContext ctx)
           
static java.util.List<java.lang.String> getExportedTypes()
          Returns a list of type names that are currently configured for export
static java.util.List getFormFieldNames(LighthouseContext s, java.lang.String processName)
          Returns a list of attributes from a form.
static java.lang.String getGatewayKeyEncryption()
           
static java.util.List getInstalledLocales(java.util.List localeIds, java.util.Locale displayLocale)
          This can be used as the valueMap property of a Select component to allow the user to select their locale.
static java.util.List getLibraryObjectNames(LighthouseContext context, java.lang.String libraryName, java.lang.String subtype)
          Obtains the library from the repository and returns a list of the names of the objects in the library prepended with the library name.
static java.util.List getListOfDnComponents(java.util.List dnlist, java.lang.String componentName)
          Given a list of dn's and the component type to return (e.g.
static java.util.List getListOfDnComponents(java.lang.String dn, java.lang.String componentName)
          Given a dn's and the component type to return (e.g.
static java.lang.String getLocalizedHelpAsString(com.waveset.session.Session displaySession, java.lang.Object help)
          This allows us to use Messsages for help objects.
static java.util.List getLoginInterfaceDisplayNames(LighthouseContext notUsed)
          Return the current list of Lighthouse login interface display names (such as message catalog keys).
static java.lang.String getMemberOrganization(LighthouseContext s)
          Get the name of the first member object group for the administrator currently logged into the session.
static PersistentObject getObject(LighthouseContext s, java.lang.String typeName, java.lang.String id)
          Get an object from the repository, subject to authorization.
static java.util.List getObjectAttributeNames(GenericObject obj)
          Returns the (String) List of attribute names for the supplied GenericObject
static java.util.List getObjectDisplayNames(LighthouseContext s, java.lang.String typeName, java.util.Map options)
          Returns a list of display names of objects of a given type to which the session owner (subject) has access.
static com.waveset.object.ObjectRef getObjectGroupByRights(LighthouseContext s, java.lang.String type, java.util.List<java.lang.String> rights)
          Get an ObjectGroup reference that the caller has the specified access rights to.
static java.util.List getObjectNames(LighthouseContext s, java.lang.String typeName)
          Return a list of the names of objects if a given type to which the session owner has access.
static java.util.List getObjectNames(LighthouseContext s, java.lang.String typeName, java.util.Map options)
          Returns a list of names of objects of a given type to which the session owner (subject) has access.
static java.util.Map<java.lang.String,java.util.List> getObjectNamesBySubtype(LighthouseContext s, java.lang.String typeName, java.util.List<java.lang.String> subtypes)
          Variant of getObjectNames() when a form needs the results broken out by subtype
static com.waveset.object.ObjectRef getObjectRef(LighthouseContext s, java.lang.String typeName, java.lang.String id)
          Get an ObjectRef from the repository given the type and name or id, subject to authorization.
static java.util.List getObjectRefList(LighthouseContext s, java.lang.String typeName, java.util.List ids)
           
static java.lang.String getOrganizationDisplayableNameByUserId(LighthouseContext s, java.util.List userIds)
          Return the displayableName for the common objectGroup which the userIds belong in.
static java.util.List getOrganizationsDisplayNames(LighthouseContext s)
          Short cut for calling getOrganizationsDisplayNames(LighthouseContext s, Map options) with no options.
static java.util.List getOrganizationsDisplayNames(LighthouseContext s, java.util.Map options)
           
static java.util.List getOrganizationsDisplayNamesWithRight(LighthouseContext s, java.lang.String type, java.lang.String targetRight)
          Calls #getOrganizationsDisplayNamesWithRights(LighthouseContext, String, List, Map) with targetRight wrapped into a list and null options.
static java.util.List getOrganizationsDisplayNamesWithRight(LighthouseContext s, java.lang.String type, java.lang.String targetRight, java.util.Map options)
          Calls #getOrganizationsDisplayNamesWithRights(LighthouseContext, String, List, Map) with targetRight wrapped into a list.
static java.util.List getOrganizationsDisplayNamesWithRights(LighthouseContext s, java.lang.String type, java.util.List targetRights)
          Calls #getOrganizationsDisplayNamesWithRights(LighthouseContext, String, List, Map) with null options.
static java.util.List getOrganizationsDisplayNamesWithRights(LighthouseContext s, java.lang.String type, java.util.List targetRights, java.util.Map options)
           
static java.lang.String getOrgPath(ObjectGroup group)
           
static java.util.List getPolicies(LighthouseContext s)
           
static java.util.List getPolicies(LighthouseContext s, java.util.Map options)
          Return a string array of policy names of the specified type.
static java.util.List getPolicies(LighthouseContext s, java.lang.String currentPolicy)
          Special call to get the policies and if the current policy is not on the list, add it to the list.
static java.util.List getPolicies(LighthouseContext s, java.lang.String type, java.lang.String currentPolicy)
          Return a string array of policy names of the specified type.
static java.util.List getPrivateApplications(LighthouseContext s, java.lang.String roleName)
          This was the original name, keep for backward compatibility.
static java.util.List getPrivateResources(LighthouseContext s, java.lang.String roleName)
          This was the original name, keep it around for backward compatibility.
static java.lang.String getRelativeDateString(int ord, int day, int mo, java.lang.String simpleDateFormatPattern)
          Generates a date string expressed in a future time such as "the second Monday in October".
static java.lang.String getRelativeDateString(int field, int amount, java.lang.String simpleDateFormatPattern)
          Generates a data string expressed as a number of units from now such as "5 minutes from now"
static java.util.Map getRepetitionUnitsMap()
          Get a map that contains the TaskSchedule repetition units.
static java.lang.Object getResourceAccountAttributeMapping(LighthouseContext context, java.lang.String resourceName, java.lang.String leftHandSideName)
          For the resource specified by resourceName, return the value for the resource account attribute in the schema map that corresponds to the IDM attribute with name leftHandSideName.
static java.lang.Object getResourceAccountAttributeType(LighthouseContext context, java.lang.String resourceName, java.lang.String leftHandSideName)
          For the resource specified by resourceName, return the type of the resource account attribute in the schema map that corresponds to the IDM attribute with name leftHandSideName.
static java.lang.Object getResourceAttributeFromResource(LighthouseContext context, java.lang.String resourceName, java.lang.String resourceAttribute)
          For the resource specified by resourceName, return the value for the resource attribute specified by resourceAttribute.
static java.util.List getResourceAttributes(LighthouseContext s, java.lang.String resource)
          Return a list of the attributes in the schema map for a particular resource.
static java.lang.String getResourceIdentity(com.waveset.session.Session session, java.lang.String resourceId)
           
static java.lang.String getResourceIdentity(java.lang.String subjectString, java.lang.String resourceId)
           
static GenericObject getResourceObject(LighthouseContext session, java.lang.String resourceId, java.lang.String objectType, java.lang.String objectId, java.util.Map options)
          Returns the requested objectId of the requested objectType from the resource
static GenericObject getResourceObject(java.lang.String subjectString, java.lang.String resourceId, java.lang.String objectType, java.lang.String objectId, java.util.Map options)
          Returns the requested objectId of the requested objectType from the resource
static java.util.List getResourceObjects(LighthouseContext session, java.lang.String objectType, java.lang.String resourceId, java.util.Map options)
           
static java.util.List getResourceObjects(LighthouseContext session, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList, java.lang.String cacheTimeout, java.lang.String clearCacheIfExists)
          Same function as getResourceObjects above, plus the ability to cache and manage the cache of the returned objects cachList - "true" to have the returned list of objects cached by the server; otherwise "false" cacheTimeout - if cacheList is true, this can set the number of milliseconds before the cache times out.
static java.util.List getResourceObjects(java.lang.String subjectString, java.lang.String objectType, java.lang.String resourceId, java.util.Map options)
           
static java.util.List getResourceObjects(java.lang.String subjectString, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList, java.lang.String cacheTimeout, java.lang.String clearCacheIfExists)
          Same function as getResourceObjects above, plus the ability to cache and manage the cache of the returned objects cachList - "true" to have the returned list of objects cached by the server; otherwise "false" cacheTimeout - if cacheList is true, this can set the number of milliseconds before the cache times out.
static java.util.List getResourceObjectTypeAttributeNames(LighthouseContext context, java.lang.String resourceName, java.lang.String objectType)
           
static java.util.List getResourceObjectTypeDisplayNames(LighthouseContext context, java.lang.String resourceName)
           
static java.util.List getResources(LighthouseContext s)
           
static java.util.List getResources(LighthouseContext s, java.util.List current)
           
static java.util.List getResources(LighthouseContext s, java.util.Map options)
          Returns a list of resources in the authorization scope of the specified lighthouse context.
static java.util.List getResources(LighthouseContext s, java.lang.String matchType, java.lang.String value)
          Build a list of the names of resources that match a particular type (like LDAP).
static java.util.List getResources(LighthouseContext s, java.lang.String matchType, java.lang.String value, java.util.List current)
           
static java.util.List getResourcesByType(LighthouseContext s, java.util.List types)
          Returns a Map of resource name/id pairs for all resources of the specified type.
static java.util.List getResourceSchemaAttributeNames(LighthouseContext context, java.lang.String nameOrId)
           
static java.util.List getResourceSchemaResourceAttributeNames(LighthouseContext context, java.lang.String nameOrId)
           
static java.util.Map getResourcesMap(LighthouseContext s, java.util.List current)
          Returns a Map which is expected to be used as the value for the valueMap attribute of a MultiSelect component.
static java.util.List getResourcesSupportingContainerObjectTypes(LighthouseContext s)
           
static java.util.List getResourcesSupportingContainerObjectTypes(LighthouseContext s, java.util.Map options)
           
static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s, java.util.List objectTypes)
           
static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s, java.util.List objectTypes, java.util.List current)
           
static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s, java.util.List objectTypes, java.util.List current, java.util.Map options)
           
static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s, java.util.List objectTypes, java.util.Map options)
           
static java.util.List getRoles(LighthouseContext s)
           
static java.util.List getRoles(LighthouseContext s, java.util.List current)
          This variant allows a list of names to be included in the returned list.
static java.util.List getRoles(LighthouseContext s, java.util.Map options)
          Returns a list of roles in the authorization scope of the specified lighthouse context.
static java.util.List getRoles(LighthouseContext s, java.lang.String current)
          This variant allows a specific name to be included in the returned list.
static java.util.List getRoleTypeNames(LighthouseContext s, java.util.Map options)
          Returns a list of the configured Role type names from the Role Configuration object.
static java.lang.String getServletContextPath(com.waveset.ui.util.RequestState request)
           
static com.waveset.session.Session getSessionForActiveSyncResource(java.lang.String name)
           
static java.lang.String getSessionTimeoutString(java.lang.String milliseconds, com.waveset.ui.util.RequestState state)
          Takes a string representing sessionTimeout (in milliseconds) for a login application and returns a formatted string suitable for use in the Login App List form.
static java.util.Map getStartupTypesMap()
          Get a map that contains the ActiveSync startup types.
static java.util.List getSubordinates(LighthouseContext s, java.lang.String manager, java.util.Map options)
          Get the managerial subordinates of a user.
static java.util.List getTimeZoneIdToDisplayNameMap(java.util.Locale locale)
          This was too complex to manage with express.
static java.lang.String getTypeDisplayName(LighthouseContext s, java.lang.String typeName)
          Get the display name of a Type, given it name.
static java.util.Map getTypeDisplayNamesWithRights(LighthouseContext s)
          Returns the set of types with rights that are not deprecated and have a valid java class.
static java.util.List getTypeNamesWithEncryptedData()
          List object types that support having encrypted data within
static java.util.List getTypeObjectsAvailableToOrg(LighthouseContext s, java.lang.String typestr, java.lang.String orgid)
          Returns a list, for use as allowedValues of a multi-select, of all member objects of the specified org Id and typestr
static java.util.List getTypesWithRights(LighthouseContext s)
           
static java.util.List getUnassignedAdminRoles(LighthouseContext s, java.util.List current)
          Build a list of adminrole names suitable for the assigned adminroles of an administrator.
static java.util.List getUnassignedAdminRoles(LighthouseContext s, java.util.List current, java.util.Map options)
          Build a list of capability names suitable for the assigned adminroles of an administrator.
static java.util.List getUnassignedApplications(LighthouseContext s, java.util.List roleNames, java.util.List current)
           
static java.util.List getUnassignedApplications(LighthouseContext s, java.util.List roleNames, java.util.Map options)
           
static java.util.List getUnassignedApplications(LighthouseContext s, java.util.Map options)
          Build a list of application names suitable for the "private applications" of a user.
static java.util.List getUnassignedApplications(LighthouseContext s, java.lang.String roleName)
           
static java.util.List getUnassignedApplications(LighthouseContext s, java.lang.String roleName, java.util.List current)
          Build a list of names suitable for the "private applications" of a user.
static java.util.List getUnassignedCapabilities(LighthouseContext s)
           
static java.util.List getUnassignedCapabilities(LighthouseContext s, java.util.List current)
          Build a list of capability names suitable for the assigned capabilities of an administrator.
static java.util.List getUnassignedCapabilities(LighthouseContext s, java.util.List current, java.util.Map options)
          Build a list of capability names suitable for the assigned capabilities of an administrator.
static java.util.List getUnassignedCapabilities(LighthouseContext s, java.util.List current, java.lang.String currentName)
          Build a list of capability names suitable for the assigned capabilities of an administrator.
static java.util.List getUnassignedResources(LighthouseContext s, java.util.Map options)
          Build a list of resource names suitable for the "private resources" of a user.
static java.util.List getUsers(LighthouseContext s)
          Returns a list of users in the authorization scope of the specified lighthouse context.
static java.util.List getUsers(LighthouseContext s, java.util.Map options)
          Returns a list of users in the authorization scope of the specified lighthouse context.
static java.lang.Boolean hasAllPermissions(LighthouseContext s, java.lang.String type, java.util.List rights)
          Returns true if the current authenticated Lighthouse user has all of the specified permission; otherwise, returns false.
static java.lang.Boolean hasAllPermissionsSubType(LighthouseContext s, java.lang.String type, java.util.List rights)
          Returns true if the current authenticated Lighthouse user has all the specified rights to the specified type (or any of its authtype subtypes).
static java.lang.Boolean hasAnyPermission(LighthouseContext s, java.lang.String type, java.util.List rights)
          Returns true if the current authenticated Lighthouse user has any of the specified permission; otherwise, returns false.
static java.lang.Boolean hasAnyPermissionSubType(LighthouseContext s, java.lang.String type, java.util.List rights)
          Returns true if the current authenticated Lighthouse user has any of the specified rights to the specified type (or any of its authtype subtypes).
static java.lang.Boolean hasCapabilities(LighthouseContext s, java.util.List capabilities)
          Returns true if the current authenticated Lighthouse user has the all of the specified capabilities; otherwise, returns false.
static java.lang.Boolean hasCapability(LighthouseContext s, java.lang.String capability)
          Returns true if the current authenticated Lighthouse user has the specified capability; otherwise, returns false.
static java.lang.Boolean hasPermissionToAnyAuthTypeSubType(LighthouseContext s, java.lang.String type, java.util.List rights)
          Returns true if the current authenticated Lighthouse user has the specified rights to the specified type or any of its authtype subtypes.
static boolean isAccountAttributeMultiValued(LighthouseContext session, java.lang.String fqAttrName)
          Determines multivalue property of an attribute
static boolean isFeatureSupported(LighthouseContext ctx, java.lang.String resourceName, java.lang.String featureName)
          Determine whether the given resource supports and has the given feature enabled.
static boolean isSRMIntegrated(LighthouseContext ctx)
           
static boolean isSubordinate(LighthouseContext ctx, java.lang.String userName, java.util.Map options)
          Determines if a user is subordinate to the caller by traversing the idmManager hierarchy.
static java.util.List listResourceObjects(LighthouseContext session, java.lang.String objectType, java.util.List resourceList, java.util.Map options, java.lang.String cacheList)
          This method returns a list of resource object names of the specified resource object type from the specified list of resources (resourceList of Ids or names).
static java.util.List listResourceObjects(LighthouseContext session, java.lang.String objectType, java.util.List resourceList, java.util.Map options, java.lang.String cacheList, java.lang.String clearCacheIfExists)
           
static java.util.List listResourceObjects(LighthouseContext session, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList)
          Variant that takes a single resourceid and an existing session.
static java.util.List listResourceObjects(LighthouseContext session, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList, java.lang.String clearCacheIfExists)
          Variant that takes a single resourceid and an existing session.
static java.util.List listResourceObjects(LighthouseContext session, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList, java.lang.String cacheTimeout, java.lang.String clearCacheIfExists)
          Variant that takes a single resourceid and an existing session; Supports cacheTimeout (e.g.
static java.util.List listResourceObjects(java.lang.String subjectString, java.lang.String objectType, java.util.List resourceList, java.util.Map options, java.lang.String cacheList)
          Variant that takes a Subject string and creates a new Session.
static java.util.List listResourceObjects(java.lang.String subjectString, java.lang.String objectType, java.util.List resourceList, java.util.Map options, java.lang.String cacheList, java.lang.String clearCacheIfExists)
          Variant that takes a Subject string and creates a new Session.
static java.util.List listResourceObjects(java.lang.String subjectString, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList)
          Variant that takes a single resourceId and a subject string.
static java.util.List listResourceObjects(java.lang.String subjectString, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList, java.lang.String clearCacheIfExists)
          Variant that takes a single resourceId and a subject string.
static java.util.List listResourceObjects(java.lang.String subjectString, java.lang.String objectType, java.lang.String resourceId, java.util.Map options, java.lang.String cacheList, java.lang.String cacheTimeout, java.lang.String clearCacheIfExists)
          Variant that takes a single resourceId and a subject string; Supports cacheTimeout (e.g.
static java.util.List listServers(LighthouseContext s)
           
static java.util.Date setRoleEventDate(LighthouseContext s, java.util.List<GenericObject> roleInfos, java.lang.String roleName, java.lang.String eventName, java.util.Map options)
          Sets a role event date on a role which may have contained roles that need to inherit the set event date.
static java.util.List sort(java.util.List l)
          Sort a List by its natural ordering and return it.
static java.lang.String stripOrgPath(java.lang.String path)
          Given an organization name in "path" form, remove the path prefix.
static java.lang.String testObject(LighthouseContext s, java.lang.String typeName, java.lang.String id)
          Created for the Dell demo, where end users need to be able to launch processes to create new users, and need to test to see if a user with a certain name already exists.
static java.lang.String testUser(LighthouseContext s, java.lang.String id)
           
static boolean workItemTypeIsOrIsChildOf(LighthouseContext s, java.lang.String selectedWorkItemType, java.lang.String workItemType)
          Returns true if the 'selectedWorkItemType' is either the same as or an extension to / child workItemType of 'workItemType'
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

FormUtil

public FormUtil()
Method Detail

buildDn

public static java.lang.String buildDn(java.lang.String name,
                                       java.lang.String baseContext)
Takes a names and the baseContext to append to the name. Returns a fully qualified dn name.


buildDns

public static java.util.List buildDns(java.util.List names,
                                      java.lang.String baseContext)
Takes a list of names and the baseContext to append to each token in the list. Returns a list of fully qualified dn names. (can be called for processing the contexts of a TextArea gadget)


buildDns

public static java.util.List buildDns(java.lang.String names,
                                      java.lang.String delimeter,
                                      java.lang.String baseContext)
Takes a string, the delimeter with which to parse the string, and the baseContext to append to each token in the string. Returns a list of fully qualified dn names. (can be called for processing the contexts of a TextArea gadget)


callResourceMethod

public static java.lang.Object callResourceMethod(LighthouseContext context,
                                                  java.lang.String resourceName,
                                                  java.lang.String methodName,
                                                  java.util.Map args)
                                           throws com.waveset.util.WavesetException
This method will invoke the specified method on the specified resource, passing the given Map of arguments into the method, if the current subject has view access to the specified resource. NOTE: This is restricted to only call resource methods which have take a single argument that is a Map. If the resource method takes more than one argument or the argument required by the resource method is not a Map this method cannot be used to call it.

Throws:
com.waveset.util.WavesetException

callWebService

public static GenericObject callWebService(LighthouseContext ctx,
                                           java.lang.String action,
                                           java.lang.String objectType,
                                           java.lang.String delegatingResourceName,
                                           java.lang.String resourceName,
                                           GenericObject parameters)
                                    throws com.waveset.util.WavesetException
This method will call a web service on a WebServiceResourceAdapter

Parameters:
ctx - the LighthouseContext
action - value returned by the getAction from WebServiceOperation
objectType - value returned by the getObjectType from WebServiceOperation
delegatingResourceName - the name of a Resource that contains an 'actionDelegate' reference to 'resourceName'. This is needed in order to transform the 'parameters' key values from left-hand side values to right-hand side values.
resourceName - name of a resource whose adapter extends the WebServiceResourceAdapter
Returns:
GenericObject The returned data from the web service. This object is structured with the following entries: - Errors: the WebServiceOperationException caught and or the error codes returned by the web service. - Results: the results returned by the web service. This can be anything from an empty value to a list of objects each with different attributes.
Throws:
com.waveset.util.WavesetException

checkStringQualityPolicy

public static java.lang.Object checkStringQualityPolicy(LighthouseContext s,
                                                        java.lang.String policy,
                                                        java.lang.Object value,
                                                        java.util.Map map,
                                                        java.util.List pwdhistory,
                                                        java.lang.String owner)
                                                 throws com.waveset.util.WavesetException
Check string value against string policy Return true if string passes policy tests or error msg(s) if fails Add option returnNull=true to map and a success will return null.

Parameters:
s - - a LighthouseContext
policy - - policy name (required)
value - - string value to check (required)
map - - map of 'must not contain' data (optional) and/or use returnNull=true to return NULL when pwd passes policy check
pwdhistory - - list of user's password history (optional)
owner - - user whose string value is being checked (required)
Returns:
object - null if passes, error msg if fails
Throws:
com.waveset.util.WavesetException

clearResourceObjectListCache

public static void clearResourceObjectListCache(LighthouseContext session,
                                                java.util.Map<java.lang.String,java.lang.Object> options)
                                         throws com.waveset.util.WavesetException
Variant that takes an options map. This is intended to allow clearing of specific cache entries created by extended filtering options. With no options specified, the entire cache is cleared.
  1. objectType - the name of a valid object class for this specified "resourceId". If null, will return objects of all object types defined by the specified resId found within the specified search container and scope.
  2. resourceId - the resource from which to get the objects
  3. templateParameters - the parameters for a template resource

Parameters:
session - - an existing session
options - - a map of options as discussed above
Throws:
com.waveset.util.WavesetException
See Also:
getResourceObjects(LighthouseContext session, String objectType, String resourceId, Map options), listResourceObjects(LighthouseContext session, String objectType, List resourceList, Map options, String cacheList)

clearResourceObjectListCache

public static void clearResourceObjectListCache(LighthouseContext session,
                                                java.lang.String objectType,
                                                java.util.List resourceList)
                                         throws com.waveset.util.WavesetException
Variant that takes a list of resourceids and an existing session

Throws:
com.waveset.util.WavesetException

clearResourceObjectListCache

public static void clearResourceObjectListCache(LighthouseContext session,
                                                java.lang.String objectType,
                                                java.lang.String resourceId)
                                         throws com.waveset.util.WavesetException
Variant that takes a single resourceid and an existing session.

Throws:
com.waveset.util.WavesetException

clearResourceObjectListCache

public static void clearResourceObjectListCache(LighthouseContext session,
                                                java.lang.String objectType,
                                                java.lang.String resourceId,
                                                java.util.Map templateParameters)
                                         throws com.waveset.util.WavesetException
Variant that takes a single resourceid (supporting resource templates) and an existing session.

Throws:
com.waveset.util.WavesetException

clearResourceObjectListCache

public static void clearResourceObjectListCache(java.lang.String subjectString,
                                                java.util.Map<java.lang.String,java.lang.Object> options)
                                         throws com.waveset.util.WavesetException
Variant that takes an options map. This is intended to allow clearing of specific cache entries created by extended filtering options. With no options specified, the entire cache is cleared.
  1. objectType - the name of a valid object class for this specified "resourceId". If null, will return objects of all object types defined by the specified resId found within the specified search container and scope.
  2. resourceId - the resource from which to get the objects
  3. templateParameters - the parameters for a template resource

Parameters:
subjectString - - a valid lighthouse serialized subject
options - - a map of options as discussed above
Throws:
com.waveset.util.WavesetException
See Also:
getResourceObjects(LighthouseContext session, String objectType, String resourceId, Map options), listResourceObjects(LighthouseContext session, String objectType, List resourceList, Map options, String cacheList)

clearResourceObjectListCache

public static void clearResourceObjectListCache(java.lang.String subjectString,
                                                java.lang.String objectType,
                                                java.util.List resourceList)
                                         throws com.waveset.util.WavesetException
Variant that takes a list of resourceids and a subject string

Throws:
com.waveset.util.WavesetException

clearResourceObjectListCache

public static void clearResourceObjectListCache(java.lang.String subjectString,
                                                java.lang.String objectType,
                                                java.lang.String resourceId)
                                         throws com.waveset.util.WavesetException
Variant that takes a single resourceId and a subject string.

Throws:
com.waveset.util.WavesetException

clearResourceObjectListCache

public static void clearResourceObjectListCache(java.lang.String subjectString,
                                                java.lang.String objectType,
                                                java.lang.String resourceId,
                                                java.util.Map templateParameters)
                                         throws com.waveset.util.WavesetException
Variant that takes a single resourceid (supporting resource templates) and a subject string.

Throws:
com.waveset.util.WavesetException

controlsAtLeastOneOrganization

public static java.lang.Boolean controlsAtLeastOneOrganization(LighthouseContext s,
                                                               java.util.List organizations)
                                                        throws com.waveset.util.WavesetException
This method will return true if the current authenticated Lighthouse user controls any one of the organizations in the list; otherwise, returns false. The supported list of organizations include those returned by listing all objects of type ObjectGroup

Throws:
com.waveset.util.WavesetException

convertDateToString

public static java.lang.String convertDateToString(java.util.Date date,
                                                   java.lang.String simpleDateFormatPattern)
Convert a date into a different date into the requested string format. The string may be of the following forms: M/d/y H:m:s z M/d/y H:m:s M/d/y yyyyMMdd HH:mm:ss (default) yyyyMMdd HH:mm:ss.SSS (canonical) nnnnnnnnnnnnnnnnn (milliseconds)


convertDateToString

public static java.lang.String convertDateToString(java.lang.String dateStr,
                                                   java.lang.String simpleDateFormatPattern)
Convert the string representation for a date into a different date string format. The string may be of the following forms: M/d/y H:m:s z M/d/y H:m:s M/d/y yyyyMMdd HH:mm:ss (default) yyyyMMdd HH:mm:ss.SSS (canonical) nnnnnnnnnnnnnnnnn (milliseconds)


convertListGenObjToStr

public static java.util.List<java.lang.String> convertListGenObjToStr(java.lang.String format,
                                                                      java.lang.String delim,
                                                                      java.util.List<GenericObject> genObjList)
                                                               throws com.waveset.util.WavesetException
Convert a list of GenericObject to a list of delimited strings.

Parameters:
format - - format to use for delimited String
delim - - delimiter used in delimited String, the whole string passed in is used as a delimiter. Special characters should not be escaped in the string that will be handled getComplexFormat.
genObjList - - GenericObject List
Returns:
List - List of delimited strings created from GenericObjects
Throws:
com.waveset.util.WavesetException

convertListGenObjToStr

public static java.util.List<java.lang.String> convertListGenObjToStr(java.lang.String format,
                                                                      java.lang.String delim,
                                                                      java.util.List<GenericObject> genObjList,
                                                                      java.lang.String dateFormat)
                                                               throws com.waveset.util.WavesetException
Convert a list of GenericObject that can contain dates to a list of delimited strings.

Parameters:
format - - format to use for delimited String
delim - - delimiter used in delimited String, the whole string passed in is used as a delimiter. Special characters should not be escaped in the string that will be handled getComplexFormat(String, String)
genObjList - - GenericObject List
dateFormat - - format of date if GenericObject contains dates
Returns:
List - List of delimited strings created from GenericObjects
Throws:
com.waveset.util.WavesetException

convertListStrToGenObj

public static java.util.List<GenericObject> convertListStrToGenObj(java.lang.String format,
                                                                   java.lang.String delim,
                                                                   java.util.List<java.lang.String> strList)
                                                            throws com.waveset.util.WavesetException
Convert a list of delimited strings to a list of generic objects.

Parameters:
format - - format of delimited String
delim - - delimiter used in delimited String, the whole string passed in is used as a delimiter. Special characters should not be escaped in the string that will be handled getComplexFormat(String, String)
strList - - List of delimited String to convert
Returns:
- List
Throws:
com.waveset.util.WavesetException

convertListStrToGenObj

public static java.util.List<GenericObject> convertListStrToGenObj(java.lang.String format,
                                                                   java.lang.String delim,
                                                                   java.lang.String str)
                                                            throws com.waveset.util.WavesetException
Convert a delimited String to a List of GenericObjects

Parameters:
format - - format of delimited String
delim - - delimiter used in delimited String, the whole string passed in is used as a delimiter. Special characters should not be escaped in the string that will be handled in getComplexFormat(String, String)
str - - delimited String
Returns:
- List
Throws:
com.waveset.util.WavesetException

countObjects

public static int countObjects(LighthouseContext s,
                               java.lang.String typeName,
                               java.util.Map options)
                        throws com.waveset.util.WavesetException
Count objects of specified type. This method returns a count of all objects of the specified type that match the conditions specified in options. The resulting count does not account for authorization constraints, including in the count objects that the caller may not be able to view.

Parameters:
s - An authenticated context object
typeName - The name of the type of object to be counted
options - A map of options that may include the following: - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be included in the count (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together.
Throws:
com.waveset.util.WavesetException

findRoleEventDate

public static java.util.Date findRoleEventDate(java.util.List roleInfos,
                                               java.util.Map options)
                                        throws com.waveset.util.WavesetException
Searches for an event date in a list of role info generic objects using the options specified. By default the earliest future event of any type is returned. If no events are found that are scheduled for the future, then null is returned. The options are: - event - Specify a specific event such as "activate" or "deactivate" - roles - Only look at the role names specified by this option. - last - Look for the latest event date rather than the earliest. - roleExclusions - Don't look at these role names - includePastEvents - Include events that are in the past. By default events in the past are excluded from the search. - noDateWins - Consider a roleinfo with no date as the earliest/latest and return null. Useful if you want to consider no date to signify "now" or "never".

Parameters:
options - - map of options - see description above for supported options
Returns:
- list of names
Throws:
com.waveset.util.WavesetException

formatDate

public static java.lang.String formatDate(java.lang.String src)
Given a string containing the long integer representation of a Date, return a formatted date string. Ocassionally necessary in forms to render timestamps. But since there is no WSAttribute representation for a long, it has to be stored as a string.


formatTransactionText

public static final java.lang.String formatTransactionText(java.util.Locale locale,
                                                           java.util.List attrNames,
                                                           java.util.List attrValues)
Used for formatting the transaction text to be signed for signed approvals.

Parameters:
locale - The locale to display in
attrNames - The list of attribute names to display
attrValues - The list of attribute values to display

getAccountAttributeType

public static java.lang.String getAccountAttributeType(LighthouseContext session,
                                                       java.lang.String fqAttrName)
Returns the 'type' of an attribute

Parameters:
session -
fqAttrName - fully qualified attribute name expressed something like user.waveset.roles or user.accounts[ldap dir].name
Returns:
name of the attribute type (ie string, date etc)

getAdministrators

public static java.util.List getAdministrators(LighthouseContext lc)
                                        throws com.waveset.util.WavesetException
Return a string array of Administrator names

Throws:
com.waveset.util.WavesetException

getAdminRoles

public static java.util.List getAdminRoles(LighthouseContext s,
                                           java.util.Map options)
                                    throws com.waveset.util.WavesetException
Returns a list of capabilities in the authorization scope of the specified lighthouse context. In addition, a map of options can be specified to further filter the list returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected capabilities - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together. - "onlyAssignedToCurrentSubject" which, if true, removes any capabilities from the returned list that are not assigned to the subject associated with the given session.

Throws:
com.waveset.util.WavesetException

getApplications

public static java.util.List getApplications(LighthouseContext s,
                                             java.util.Map options)
                                      throws com.waveset.util.WavesetException
Returns a list of applications in the authorization scope of the specified lighthouse context. In addition, a map of options can be specified to further filter the list returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected applications - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together.

Throws:
com.waveset.util.WavesetException

getAttributesSelectOptionGroupMap

public static java.util.Map getAttributesSelectOptionGroupMap(LighthouseContext s)
                                                       throws com.waveset.util.WavesetException
Builds data structure appropriate for the 'optionsGroupMap' property of a Select component that displays all form and resource attributes. See Select.setOptionGroupMap(java.util.Map) for details on the structure of this map.

Parameters:
s -
Returns:
map appriate for the optionGroupMap property of a Select component
Throws:
com.waveset.util.WavesetException
See Also:
Select

getAttributesSelectOptionGroupMap

public static java.util.Map getAttributesSelectOptionGroupMap(LighthouseContext s,
                                                              java.util.Map additionalEntries,
                                                              java.lang.String additionalEntriesMsg)
                                                       throws com.waveset.util.WavesetException
Builds data structure appropriate for the 'optionsGroupMap' property of a Select component that displays resource attributes. Attributes that are found on multiple resources are grouped in an option group called "Common Attributes". Fully-qualified names are not used. The Map of additionalEntries (mapping attribute name to display name) is stored in the map under the additionalEntriesMsg option group. See Select.setOptionGroupMap(java.util.Map) for details on the structure of this map.

Parameters:
s -
additionalEntries - The additional attributes to store in the map.
additionalEntriesMsg - The message key of the option group under which to store the additional entries.
Returns:
map appriate for the optionGroupMap property of a Select component
Throws:
com.waveset.util.WavesetException
See Also:
Select

getAttributesSelectValueMap

public static java.util.Map getAttributesSelectValueMap(LighthouseContext s)
                                                 throws com.waveset.util.WavesetException
Builds data structure appropriate for the 'valueMap' property of a Select component that displays all form and resource attributes. See Select.setValueMap(java.util.Map) for details on the structure of this map.

Parameters:
s -
Returns:
map appropriate for the valueMap property of a Select component
Throws:
com.waveset.util.WavesetException
See Also:
Select

getAuditActions

public static java.util.List getAuditActions(LighthouseContext s,
                                             java.lang.String objectType)
                                      throws com.waveset.util.WavesetException
Get a list of audit actions available to the given content for the objectType. Used by the reporting forms.

Throws:
com.waveset.util.WavesetException

getAuditActions

public static java.util.List getAuditActions(LighthouseContext s,
                                             java.lang.String objectType,
                                             boolean includeAll)
                                      throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getAuditFormatterMap

public static java.util.Map getAuditFormatterMap(LighthouseContext context)
                                          throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getAuditObjectTypes

public static java.util.List getAuditObjectTypes(LighthouseContext s)
                                          throws com.waveset.util.WavesetException
Get a list of audit object types available to the given context. Used by the reporting forms.

Throws:
com.waveset.util.WavesetException

getAuditPublisherMap

public static java.util.Map getAuditPublisherMap(LighthouseContext context)
                                          throws com.waveset.util.WavesetException
Returns:
a map of registered audit publishers, where the key is the class name and the value is the display name of the publisher.
Throws:
com.waveset.util.WavesetException

getAuditPublisherOptions

public static java.util.List getAuditPublisherOptions(java.lang.String className)

getAuditStatusList

public static java.util.List getAuditStatusList(LighthouseContext s)
                                         throws com.waveset.util.WavesetException
Get a list of audit status types available to the given context. Used by the reporting forms.

Throws:
com.waveset.util.WavesetException

getAuditStatusList

public static java.util.List getAuditStatusList(LighthouseContext s,
                                                boolean includeAll)
                                         throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getAvailableCharsets

public static java.util.Map getAvailableCharsets()
Returns:
a list of available Charsets

getAvailableDataOrGatewayCipherNames

public static java.util.List<java.lang.String> getAvailableDataOrGatewayCipherNames(com.waveset.session.Session displaySession)

getAvailableDataOrGatewayCiphers

public static java.util.List<java.lang.String> getAvailableDataOrGatewayCiphers(com.waveset.session.Session displaySession)

getAvailableEncryptionKeyCipherNames

public static java.util.List<java.lang.String> getAvailableEncryptionKeyCipherNames(com.waveset.session.Session displaySession)

getAvailableEncryptionKeyCiphers

public static java.util.List<java.lang.String> getAvailableEncryptionKeyCiphers(com.waveset.session.Session displaySession)

getAvailablePDFFonts

public static java.util.List getAvailablePDFFonts()
Returns:
a list of installed PDF fonts. These are the default PDF fonts (e.g. Helvetica) as well as any fonts the user has specified in the WEB-INF/fonts directory.

getCapabilities

public static java.util.List getCapabilities(LighthouseContext s,
                                             java.util.Map options)
                                      throws com.waveset.util.WavesetException
Returns a list of capabilities in the authorization scope of the specified lighthouse context. In addition, a map of options can be specified to further filter the list returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected capabilities - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together. - "onlyAssignedToCurrentSubject" which, if true, removes any capabilities from the returned list that are not assigned to the subject associated with the given session.

Throws:
com.waveset.util.WavesetException

getCodeIdVersion

public static java.lang.String getCodeIdVersion(java.lang.Class clazz)
Get the version of the code id from the class.

Parameters:
clazz - Class to query.
Returns:
Returns the version otherwise null.

getCodeIdVersion

public static java.lang.String getCodeIdVersion(java.lang.String clazz)
Get the version of the code id from the class.

Parameters:
clazz - Full qualified class to query.
Returns:
Returns the version otherwise null.

getComplexFormat

public static java.util.List<java.lang.String> getComplexFormat(java.lang.String str,
                                                                java.lang.String delim)
This method converts a delimited string into a list of the delimited components. An empty string at the end of the delimited string will not be returned. ie "STR1|:|:STR2|:" returns [("STR1", "", "STR2")]

Parameters:
str - - delimited string
delim - - delimiter used, the whole string passed in is used as one delimiter. Special characters should not be escaped in the string, we currently only escape the | (pipe) char via escapeDelimiter(String).
Returns:
- List

getConfigExtension

public static GenericObject getConfigExtension(com.waveset.object.ObjectRef objectRef)
                                        throws com.waveset.util.WavesetException
Returns the extension within a Configuration object, expecting that extension to be a GenericObject.

Parameters:
objectRef - -- Reference to a Configuration object containing a GenericObject
Returns:
-- contained GenericObject, or null.
Throws:
com.waveset.util.WavesetException

getConfigExtensionMap

public static java.util.Map getConfigExtensionMap(java.util.List configObjectRefs)
                                           throws com.waveset.util.WavesetException
Takes a list of ObjectRefs that are expected to be References to Configuration objects that contain an extension which is a generic object with a "name" attribute. Generates a map from the name of the configuration objects to the names of the generic objects within them.

Parameters:
configObjectRefs - -- list of ObjectRefs to Config objects
Returns:
-- map of config objects names to names in extensions.
Throws:
com.waveset.util.WavesetException

getCurrentObjectEncryption

public static java.lang.String getCurrentObjectEncryption()
                                                   throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getCurrentServerKeyEncryption

public static java.lang.String getCurrentServerKeyEncryption()
                                                      throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getDisplayLocale

public static java.util.Locale getDisplayLocale(com.waveset.session.Session session)
Extract the locale from the session. The Locale won't always be available in the session, so only rely on this if you can invoke this with :display.session.


getDnComponent

public static java.lang.String getDnComponent(java.lang.String dn,
                                              java.lang.String componentName)
Given a dn's and the component type to return (e.g. "cn="), returns the component name as a string


getEndUserResources

public static java.util.List getEndUserResources(LighthouseContext ctx)
                                          throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getExportedTypes

public static java.util.List<java.lang.String> getExportedTypes()
Returns a list of type names that are currently configured for export


getFormFieldNames

public static java.util.List getFormFieldNames(LighthouseContext s,
                                               java.lang.String processName)
                                        throws com.waveset.util.WavesetException
Returns a list of attributes from a form. The list of attributes is filtered to NOT include container UI widgets.

Parameters:
s -
processName - String used to access the form from which attributes will be retrieved. If null, defaults to 'userForm'.
Returns:
list of all attributes from the form
Throws:
com.waveset.util.WavesetException

getGatewayKeyEncryption

public static java.lang.String getGatewayKeyEncryption()
                                                throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getInstalledLocales

public static final java.util.List getInstalledLocales(java.util.List localeIds,
                                                       java.util.Locale displayLocale)
This can be used as the valueMap property of a Select component to allow the user to select their locale. Returns a list of alternating localeId (as determined by Locales.localeToString) and the display name for the locale according to displayLocale. The code restricts the locales to the ones defined by localeIds and any CustomCatalog that is installed. displayLocale can be null to use the default locale.


getLibraryObjectNames

public static final java.util.List getLibraryObjectNames(LighthouseContext context,
                                                         java.lang.String libraryName,
                                                         java.lang.String subtype)
                                                  throws com.waveset.util.WavesetException
Obtains the library from the repository and returns a list of the names of the objects in the library prepended with the library name. For example, library name = "foo" and library object named "bar" would have the following entry in the resulting list: "foo:bar".

Parameters:
context - - Lighthouse context
libraryName - - library name
subtype - - subtype of object to list from the library
Returns:
a list with the values or null if the library was not found or there were no objects in the library.
Throws:
com.waveset.util.WavesetException - upon error.

getListOfDnComponents

public static java.util.List getListOfDnComponents(java.util.List dnlist,
                                                   java.lang.String componentName)
Given a list of dn's and the component type to return (e.g. "cn="), returns a list of component names.


getListOfDnComponents

public static java.util.List getListOfDnComponents(java.lang.String dn,
                                                   java.lang.String componentName)
Given a dn's and the component type to return (e.g. "cn="), returns the component name in a list (useful for form invoke when not sure if value returned from adapter is a single string or a list of strings)


getLocalizedHelpAsString

public static final java.lang.String getLocalizedHelpAsString(com.waveset.session.Session displaySession,
                                                              java.lang.Object help)
This allows us to use Messsages for help objects. It's not as nice as having a setHelp(Message) on Component, but it's not as invasive since it's rare to have i-help that requires parameters.


getLoginInterfaceDisplayNames

public static java.util.List getLoginInterfaceDisplayNames(LighthouseContext notUsed)
                                                    throws com.waveset.util.WavesetException
Return the current list of Lighthouse login interface display names (such as message catalog keys).

Parameters:
notUsed - Context - not actually used, left for backward compatibility - can be null.
Throws:
com.waveset.util.WavesetException

getMemberOrganization

public static java.lang.String getMemberOrganization(LighthouseContext s)
                                              throws com.waveset.util.WavesetException
Get the name of the first member object group for the administrator currently logged into the session.

This assumes the administrator controls the group of which they are a member, otherwise they won't be able to read themselves. Would be nicer to have an Administrator view that can be used to return information about the current admin.

Throws:
com.waveset.util.WavesetException

getObject

public static PersistentObject getObject(LighthouseContext s,
                                         java.lang.String typeName,
                                         java.lang.String id)
                                  throws com.waveset.util.WavesetException
Get an object from the repository, subject to authorization.

Throws:
com.waveset.util.WavesetException

getObjectAttributeNames

public static java.util.List getObjectAttributeNames(GenericObject obj)
Returns the (String) List of attribute names for the supplied GenericObject

Parameters:
obj - the GenericObject
Returns:
the list of attribute names found in obj

getObjectDisplayNames

public static java.util.List getObjectDisplayNames(LighthouseContext s,
                                                   java.lang.String typeName,
                                                   java.util.Map options)
                                            throws com.waveset.util.WavesetException
Returns a list of display names of objects of a given type to which the session owner (subject) has access. This is similar to getObjectNames except it will return the display names for the object type specified. For all object types other than ObjectGroup, the display name is the same as the name. However, for type ObjectGroup, the display name returned will be either the short org name or the full path name of the org depending on whether the pathPrefixes option is set to true or false. This method is provided as a convienent wrapper of getObjectNames and getOrganizationsDisplayNames for form fields where the type argument is variable.

In addition, a map of options can be specified to further filter the list of names returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected applications - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together. When typeName is "ObjectGroup" the following options are also supported: - "excluded" - a list of Organization names to exclude from the list returned. - "current" - a list of Organizations name to add to the list returned if not already there. - "filterVirtual" - if "true", remove any virtual Organizations from the returned list. - "pathPrefixes" - if "true", return Organizations full path names. If null or "false, return Organizations short display names.

Throws:
com.waveset.util.WavesetException

getObjectGroupByRights

public static com.waveset.object.ObjectRef getObjectGroupByRights(LighthouseContext s,
                                                                  java.lang.String type,
                                                                  java.util.List<java.lang.String> rights)
                                                           throws com.waveset.util.WavesetException
Get an ObjectGroup reference that the caller has the specified access rights to. This method returns any ObjectGroup for which the Subject specified by the calling context has object rights to.

Parameters:
s - Context of the caller. If the calling context is null, null is returned.
type - Type of object to test rights for. Name of type must match formal name as specified in com.waveset.object.Constants. If the type does not exist, null is returned.
rights - List of Rights to check for. Rights must be the formal name as specified in com.waveset.object.Constants. If any of the rights specified do not exist null is returned. Both direct and implied matches are considered matches.
Throws:
com.waveset.util.WavesetException

getObjectNames

public static java.util.List getObjectNames(LighthouseContext s,
                                            java.lang.String typeName)
                                     throws com.waveset.util.WavesetException
Return a list of the names of objects if a given type to which the session owner has access.

Throws:
com.waveset.util.WavesetException

getObjectNames

public static java.util.List getObjectNames(LighthouseContext s,
                                            java.lang.String typeName,
                                            java.util.Map options)
                                     throws com.waveset.util.WavesetException
Returns a list of names of objects of a given type to which the session owner (subject) has access. In addition, a map of options can be specified to further filter the list of names returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected applications - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together.

Throws:
com.waveset.util.WavesetException

getObjectNamesBySubtype

public static java.util.Map<java.lang.String,java.util.List> getObjectNamesBySubtype(LighthouseContext s,
                                                                                     java.lang.String typeName,
                                                                                     java.util.List<java.lang.String> subtypes)
                                                                              throws com.waveset.util.WavesetException
Variant of getObjectNames() when a form needs the results broken out by subtype

Throws:
com.waveset.util.WavesetException

getObjectRef

public static com.waveset.object.ObjectRef getObjectRef(LighthouseContext s,
                                                        java.lang.String typeName,
                                                        java.lang.String id)
                                                 throws com.waveset.util.WavesetException
Get an ObjectRef from the repository given the type and name or id, subject to authorization.

Throws:
com.waveset.util.WavesetException

getObjectRefList

public static java.util.List getObjectRefList(LighthouseContext s,
                                              java.lang.String typeName,
                                              java.util.List ids)
                                       throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getOrganizationDisplayableNameByUserId

public static java.lang.String getOrganizationDisplayableNameByUserId(LighthouseContext s,
                                                                      java.util.List userIds)
                                                               throws com.waveset.util.WavesetException
Return the displayableName for the common objectGroup which the userIds belong in.

Parameters:
s -
userIds -
Returns:
the displayableName of the single object group which the userd belong. Returns null if any of the userId is not a valid user id, or if any or all users belong to multiple object groups
Throws:
com.waveset.util.WavesetException

getOrganizationsDisplayNames

public static java.util.List getOrganizationsDisplayNames(LighthouseContext s)
                                                   throws com.waveset.util.WavesetException
Short cut for calling getOrganizationsDisplayNames(LighthouseContext s, Map options) with no options.

Throws:
com.waveset.util.WavesetException

getOrganizationsDisplayNames

public static java.util.List getOrganizationsDisplayNames(LighthouseContext s,
                                                          java.util.Map options)
                                                   throws com.waveset.util.WavesetException
Returns:
a list of organization pathnames or displaynames that may be assigned to an object. This should be used by all forms that need organization select and multi-select list. - "excluded" - a list of Organization names to exclude from the list returned. - "current" - a list of Organizations name to add to the list returned if not already there. - "filterVirtual" - if "true", remove any virtual Organizations from the returned list. - "pathPrefixes" - if "true", return Organizations full path names. If null or "false, return Organizations short display names.
Throws:
com.waveset.util.WavesetException

getOrganizationsDisplayNamesWithRight

public static java.util.List getOrganizationsDisplayNamesWithRight(LighthouseContext s,
                                                                   java.lang.String type,
                                                                   java.lang.String targetRight)
                                                            throws com.waveset.util.WavesetException
Calls #getOrganizationsDisplayNamesWithRights(LighthouseContext, String, List, Map) with targetRight wrapped into a list and null options.

Parameters:
s -
type -
targetRight -
Returns:
a list containing the display names of organizations.
Throws:
com.waveset.util.WavesetException

getOrganizationsDisplayNamesWithRight

public static java.util.List getOrganizationsDisplayNamesWithRight(LighthouseContext s,
                                                                   java.lang.String type,
                                                                   java.lang.String targetRight,
                                                                   java.util.Map options)
                                                            throws com.waveset.util.WavesetException
Calls #getOrganizationsDisplayNamesWithRights(LighthouseContext, String, List, Map) with targetRight wrapped into a list.

Parameters:
s -
type -
targetRight -
options -
Returns:
a list containing the display names of organizations.
Throws:
com.waveset.util.WavesetException

getOrganizationsDisplayNamesWithRights

public static java.util.List getOrganizationsDisplayNamesWithRights(LighthouseContext s,
                                                                    java.lang.String type,
                                                                    java.util.List targetRights)
                                                             throws com.waveset.util.WavesetException
Calls #getOrganizationsDisplayNamesWithRights(LighthouseContext, String, List, Map) with null options.

Parameters:
s -
type -
targetRights -
Returns:
a list containing the display names of organizations.
Throws:
com.waveset.util.WavesetException

getOrganizationsDisplayNamesWithRights

public static java.util.List getOrganizationsDisplayNamesWithRights(LighthouseContext s,
                                                                    java.lang.String type,
                                                                    java.util.List targetRights,
                                                                    java.util.Map options)
                                                             throws com.waveset.util.WavesetException
Parameters:
s - Context used to retrieve the organization names.
type - The object type on which the targetRights are desired.
targetRights - The rights on the object type that are desired.
options - Contains options to control what is returned. These options are passed into the underlying listObjects() call. In addition to options valid for listObjects(), the following options are also available:
pathPrefixes
If "true", then the organization names are returned using the path syntax, e.g. Top:Org1:OrgB. Otherwise, the display names are returned.
includeId
If "true", the list is returned in "map list" format where the organization (ObjectGroup) object ids are followed by the organization names, i.e. the list would contain the id of org1 followed by the name of org1 followed by the id of org2 followed by the name of org2, etc.
returnMapList
If "true", the list is return in "map list" format. This option is ignored if the includeId option is set to "true". The organization display name will be followed by either the display name (again) or the full path name (if the pathPrefixes option is set to "true").
Returns:
A list of organization names for which the subject has the specified Rights on the specified object type. Depending on the options specified, the list can just be a simple list or it can be a "map list" suitable for use in setting the valueMap property of the Select HTML component.
Throws:
com.waveset.util.WavesetException

getOrgPath

public static java.lang.String getOrgPath(ObjectGroup group)
                                   throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getPolicies

public static java.util.List getPolicies(LighthouseContext s)
                                  throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getPolicies

public static java.util.List getPolicies(LighthouseContext s,
                                         java.util.Map options)
                                  throws com.waveset.util.WavesetException
Return a string array of policy names of the specified type. If type is null, return all policy names. In addition, a map of options can be specified to further filter the list of names returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected applications - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together. - "typeString" - specifies the specific type of policy (e.g. StringQualityPolicy, Lighthouse Account, etc.)

Throws:
com.waveset.util.WavesetException

getPolicies

public static java.util.List getPolicies(LighthouseContext s,
                                         java.lang.String currentPolicy)
                                  throws com.waveset.util.WavesetException
Special call to get the policies and if the current policy is not on the list, add it to the list.

This is for the case of a resource administrator who does not have access to the policy referred to by the current resource.

jsl - this feels like it needs to be generalized

Throws:
com.waveset.util.WavesetException

getPolicies

public static java.util.List getPolicies(LighthouseContext s,
                                         java.lang.String type,
                                         java.lang.String currentPolicy)
                                  throws com.waveset.util.WavesetException
Return a string array of policy names of the specified type. If type is null, return all policy names

Throws:
com.waveset.util.WavesetException

getPrivateApplications

public static java.util.List getPrivateApplications(LighthouseContext s,
                                                    java.lang.String roleName)
                                             throws com.waveset.util.WavesetException
This was the original name, keep for backward compatibility.

Throws:
com.waveset.util.WavesetException

getPrivateResources

public static java.util.List getPrivateResources(LighthouseContext s,
                                                 java.lang.String roleName)
                                          throws com.waveset.util.WavesetException
This was the original name, keep it around for backward compatibility.

Throws:
com.waveset.util.WavesetException

getRelativeDateString

public static java.lang.String getRelativeDateString(int ord,
                                                     int day,
                                                     int mo,
                                                     java.lang.String simpleDateFormatPattern)
Generates a date string expressed in a future time such as "the second Monday in October". If the current time is BEFORE the date generated by the input parameters, the date will be for the current year. If the current time is AFTER the date generated, the year will be incremented by one such that the date occurs in the future.

Parameters:
ord - Integer representing the ordinal of the day of the week for the generated date and must be a number between 1 and 5 inclusive. If there are only four days in the month and the value of this parameter is 5, the result of this method call is undefined.
day - Integer representing a day of the week. Legal values correspond with constants used by the Calendar class, namely:
          1 (Sunday)
          2 (Monday)
          3 Tuesday)
          4 (Wednesday)
          5 (Thursday)
          6 (Friday)
          7 (Saturday)
        
mo - Integer representing a month. Legal values correspond with constants used by the Calendar class, namely:
          0 (January)
          1 (February)
          2 (March)
          3 (April)
          4 (May)
          5 (June)
          6 (July)
          7 (August)
          8 (September)
          9 (October)
          10 (November)
          11 (December)
        
simpleDateFormatPattern - formatter for the returned data strings of one of the forms:
                    M/d/y H:m:s z
                    M/d/y H:m:s
                    M/d/y
                    yyyyMMdd HH:mm:ss   (default)
                    yyyyMMdd HH:mm:ss.SSS       (canonical)
                    nnnnnnnnnnnnnnnnn   (milliseconds)
        
Returns:
a time/date string formatted according to simpleDateFormatPatern

getRelativeDateString

public static java.lang.String getRelativeDateString(int field,
                                                     int amount,
                                                     java.lang.String simpleDateFormatPattern)
Generates a data string expressed as a number of units from now such as "5 minutes from now"

Parameters:
field - Integer corresponding to the field of the date to increment. Legal values correspond with constants used by the Calendar class, namely: 0 (era) 1 (year) 2 (month) 3 (week of year) 4 (week of month) 5 (day of month) 6 (day of year) 7 (day of week) 8 (day of week in month) 9 (am/pm) 10 (hour) 11 (hour of day) 12 (minute) 13 (second) 14 (millisecond) 15 (zone offset) 16 (daylight savings time offset)
amount -
simpleDateFormatPattern - formatter for the returned data strings of one of the forms:
                    M/d/y H:m:s z
                    M/d/y H:m:s
                    M/d/y
                    yyyyMMdd HH:mm:ss   (default)
                    yyyyMMdd HH:mm:ss.SSS       (canonical)
                    nnnnnnnnnnnnnnnnn   (milliseconds)
        
Returns:
a time/date string formatted according to simpleDateFormatPatern

getRepetitionUnitsMap

public static java.util.Map getRepetitionUnitsMap()
Get a map that contains the TaskSchedule repetition units. The key of the map is the name of the repitition unit and the value of the map is the displayName. This can be used directly as the value of the valueMap property for a Select component.


getResourceAccountAttributeMapping

public static java.lang.Object getResourceAccountAttributeMapping(LighthouseContext context,
                                                                  java.lang.String resourceName,
                                                                  java.lang.String leftHandSideName)
                                                           throws com.waveset.util.WavesetException
For the resource specified by resourceName, return the value for the resource account attribute in the schema map that corresponds to the IDM attribute with name leftHandSideName.

Throws:
com.waveset.util.WavesetException

getResourceAccountAttributeType

public static java.lang.Object getResourceAccountAttributeType(LighthouseContext context,
                                                               java.lang.String resourceName,
                                                               java.lang.String leftHandSideName)
                                                        throws com.waveset.util.WavesetException
For the resource specified by resourceName, return the type of the resource account attribute in the schema map that corresponds to the IDM attribute with name leftHandSideName.

Throws:
com.waveset.util.WavesetException

getResourceAttributeFromResource

public static java.lang.Object getResourceAttributeFromResource(LighthouseContext context,
                                                                java.lang.String resourceName,
                                                                java.lang.String resourceAttribute)
                                                         throws com.waveset.util.WavesetException
For the resource specified by resourceName, return the value for the resource attribute specified by resourceAttribute. If the resource does not exist, return null.

Throws:
com.waveset.util.WavesetException

getResourceAttributes

public static java.util.List getResourceAttributes(LighthouseContext s,
                                                   java.lang.String resource)
                                            throws com.waveset.util.WavesetException
Return a list of the attributes in the schema map for a particular resource.

Throws:
com.waveset.util.WavesetException

getResourceIdentity

public static java.lang.String getResourceIdentity(com.waveset.session.Session session,
                                                   java.lang.String resourceId)
                                            throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourceIdentity

public static java.lang.String getResourceIdentity(java.lang.String subjectString,
                                                   java.lang.String resourceId)
                                            throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourceObject

public static GenericObject getResourceObject(LighthouseContext session,
                                              java.lang.String resourceId,
                                              java.lang.String objectType,
                                              java.lang.String objectId,
                                              java.util.Map options)
                                       throws com.waveset.util.WavesetException
Returns the requested objectId of the requested objectType from the resource

Parameters:
session - - a valid lighthouse session
objectType - - a valid object type defined in the resource's section
objectId - - a valid fully qualified object identifier on this resource (e.g. "dn")
options - - options can be specified which control the behavior the request. They include:
    "searchAttrsToGet" - a list of objectType specific attribute names to get
Throws:
com.waveset.util.WavesetException

getResourceObject

public static GenericObject getResourceObject(java.lang.String subjectString,
                                              java.lang.String resourceId,
                                              java.lang.String objectType,
                                              java.lang.String objectId,
                                              java.util.Map options)
                                       throws com.waveset.util.WavesetException
Returns the requested objectId of the requested objectType from the resource

Parameters:
subjectString - - a valid Lighthouse subject name
objectType - - a valid object type defined in the resource's section
objectId - - a valid fully qualified object identifier on this resource (e.g. "dn")
options - - options can be specified which control the behavior the request. They include:
    "searchAttrsToGet" - a list of objectType specific attribute names to get
Throws:
com.waveset.util.WavesetException

getResourceObjects

public static java.util.List getResourceObjects(LighthouseContext session,
                                                java.lang.String objectType,
                                                java.lang.String resourceId,
                                                java.util.Map options)
                                         throws com.waveset.util.WavesetException
Parameters:
session - - a valid lighthouse session
objectType - - the name of a valid object class for this specified "resId". If null, will return objects of all object types defined by the specified resId found within the specified search container and scope.
resourceId - - the resource from which to get the objects
options - - several options can be specified which control the behavior of the search. They include:
    "searchContext" - the value of this option determines within what context to perform search (ResourceAdapter.RA_SEARCH_CONTEXT). If not specified, will attempt to get a value from RA_BASE_CONTEXT. If no value, will assume search should be done from logical top.
  1. "searchFilter" - optional specification, in LDAP search filter format as specified in RFC 1558, of one or more object <attr name> <condition> <value> tuples either and'ed or or'ed together. If not specified, a filter will be constructed using the specified objectType. (ResourceAdapter.SEARCH_FILTER).
  2. "searchScope" - specifies whether the search should be done on the current object, only within the context of the specified "searchContext", or in all subcontext within the specified "searchContext" (ResourceAdapter.RA_SEARCH_SCOPE). Valid values are "object", "oneLevel", or "subTree" indicates that the search should be performed on all sub contexts within the specified "searchContext".
  3. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  4. "searchAttrsToGet" - the list of objectType specific attribute names to get per object
  5. "runAsUser" - user name this request is to be run as. If not specified, defaults to resource proxy admin user.
  6. "runAsPassword" - password of runAsUser. Required to authenticate with resource in order to run the list request as the specified user
Returns:
a list of objects where each object contains a set of attributes, including type, name, and id (fully-qualified name such as DN), as well as any requested searchAttrsToGet

Throws:
com.waveset.util.WavesetException

getResourceObjects

public static java.util.List getResourceObjects(LighthouseContext session,
                                                java.lang.String objectType,
                                                java.lang.String resourceId,
                                                java.util.Map options,
                                                java.lang.String cacheList,
                                                java.lang.String cacheTimeout,
                                                java.lang.String clearCacheIfExists)
                                         throws com.waveset.util.WavesetException
Same function as getResourceObjects above, plus the ability to cache and manage the cache of the returned objects
    cachList - "true" to have the returned list of objects cached by the server; otherwise "false"
  1. cacheTimeout - if cacheList is true, this can set the number of milliseconds before the cache times out. When the cache times out, the object will automatically be retrieved from the resource the next time they are requested (e.g. 60000 = 1 minute)
  2. clearCacheIfExists - force the cache to be cleared and the objects to be re fetched from the resource the next time they are requested

Throws:
com.waveset.util.WavesetException

getResourceObjects

public static java.util.List getResourceObjects(java.lang.String subjectString,
                                                java.lang.String objectType,
                                                java.lang.String resourceId,
                                                java.util.Map options)
                                         throws com.waveset.util.WavesetException
Parameters:
subjectString - - a valid lighthouse serialized subject
objectType - - the name of a valid object class for this specified "resId". If null, will return objects of all object types defined by the specified resId found within the specified search container and scope.
resourceId - - the resource from which to get the objects
options - - several options can be specified which control the behavior of the search. They include:
    "searchContext" - the value of this option determines within what context to perform search (ResourceAdapter.RA_SEARCH_CONTEXT). If not specified, will attempt to get a value from RA_BASE_CONTEXT. If no value, will assume search should be done from logical top.
  1. "searchFilter" - optional specification, in LDAP search filter format as specified in RFC 1558, of one or more object <attr name> <condition> <value> tuples either and'ed or or'ed together. If not specified, a filter will be constructed using the specified objectType. (ResourceAdapter.SEARCH_FILTER).
  2. "searchScope" - specifies whether the search should be done on the current object, only within the context of the specified "searchContext", or in all subcontext within the specified "searchContext" (ResourceAdapter.RA_SEARCH_SCOPE). Valid values are "object", "oneLevel", or "subTree" indicates that the search should be performed on all sub contexts within the specified "searchContext".
  3. "searchTimeLimit" - the timelimit in milliseconds a search should not exceed (ResourceAdapter.RA_SEARCH_TIME_LIMIT).
  4. "searchAttrsToGet" - the list of objectType specific attribute names to get per object
  5. "runAsUser" - user name this request is to be run as. If not specified, defaults to resource proxy admin user.
  6. "runAsPassword" - password of runAsUser. Required to authenticate with resource in order to run the list request as the specified user
Returns:
a list of objects where each object contains a set of attributes, including type, name, and id (fully-qualified name such as DN), as well as any requested attrsToGet.

Throws:
com.waveset.util.WavesetException

getResourceObjects

public static java.util.List getResourceObjects(java.lang.String subjectString,
                                                java.lang.String objectType,
                                                java.lang.String resourceId,
                                                java.util.Map options,
                                                java.lang.String cacheList,
                                                java.lang.String cacheTimeout,
                                                java.lang.String clearCacheIfExists)
                                         throws com.waveset.util.WavesetException
Same function as getResourceObjects above, plus the ability to cache and manage the cache of the returned objects
    cachList - "true" to have the returned list of objects cached by the server; otherwise "false"
  1. cacheTimeout - if cacheList is true, this can set the number of milliseconds before the cache times out. When the cache times out, the object will automatically be retrieved from the resource the next time they are requested (e.g. 60000 = 1 minute)
  2. clearCacheIfExists - force the cache to be cleared and the objects to be re fetched from the resource the next time they are requested

Throws:
com.waveset.util.WavesetException

getResourceObjectTypeAttributeNames

public static java.util.List getResourceObjectTypeAttributeNames(LighthouseContext context,
                                                                 java.lang.String resourceName,
                                                                 java.lang.String objectType)

getResourceObjectTypeDisplayNames

public static java.util.List getResourceObjectTypeDisplayNames(LighthouseContext context,
                                                               java.lang.String resourceName)

getResources

public static java.util.List getResources(LighthouseContext s)
                                   throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResources

public static java.util.List getResources(LighthouseContext s,
                                          java.util.List current)
                                   throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResources

public static java.util.List getResources(LighthouseContext s,
                                          java.util.Map options)
                                   throws com.waveset.util.WavesetException
Returns a list of resources in the authorization scope of the specified lighthouse context. In addition, a map of options can be specified to further filter the list returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected resources - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together. In order for a resource to be returned, it's "facets" attribute must contain "provision" and/or "activesync". "provision" is the default value for a Resource object that does not specify a "facets" attribute. However, there are some Resources that do not provide provisioning or activesync operations, so they are not returned here unless the following is specified in "conditions" attribute of the the "options" argument: facets is one of provision activesync none

Throws:
com.waveset.util.WavesetException

getResources

public static java.util.List getResources(LighthouseContext s,
                                          java.lang.String matchType,
                                          java.lang.String value)
                                   throws com.waveset.util.WavesetException
Build a list of the names of resources that match a particular type (like LDAP).

Throws:
com.waveset.util.WavesetException

getResources

public static java.util.List getResources(LighthouseContext s,
                                          java.lang.String matchType,
                                          java.lang.String value,
                                          java.util.List current)
                                   throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourcesByType

public static java.util.List getResourcesByType(LighthouseContext s,
                                                java.util.List types)
                                         throws com.waveset.util.WavesetException
Returns a Map of resource name/id pairs for all resources of the specified type.

Parameters:
s - Lighthouse context
current - a list of one or more currently selected resources
Throws:
com.waveset.util.WavesetException

getResourceSchemaAttributeNames

public static java.util.List getResourceSchemaAttributeNames(LighthouseContext context,
                                                             java.lang.String nameOrId)
                                                      throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourceSchemaResourceAttributeNames

public static java.util.List getResourceSchemaResourceAttributeNames(LighthouseContext context,
                                                                     java.lang.String nameOrId)
                                                              throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourcesMap

public static java.util.Map getResourcesMap(LighthouseContext s,
                                            java.util.List current)
                                     throws com.waveset.util.WavesetException
Returns a Map which is expected to be used as the value for the valueMap attribute of a MultiSelect component. This also returns multiple entries for resources which support multiple accounts. For the multiple account resources, there will be one entry returned for the primary resource, and one additional entry returned for each account type of that resource. The display name for the resource account types is: resourceName|accountType, but this can be changed by changing the UI_RESOURCE_WITH_ACCOUNT_TYPE key in WPMessages.properties. The value returned for the resource account types is always: resourceName|accountType.

Parameters:
s - Lighthouse context
current - a list of one or more currently selected resources
Throws:
com.waveset.util.WavesetException

getResourcesSupportingContainerObjectTypes

public static java.util.List getResourcesSupportingContainerObjectTypes(LighthouseContext s)
                                                                 throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourcesSupportingContainerObjectTypes

public static java.util.List getResourcesSupportingContainerObjectTypes(LighthouseContext s,
                                                                        java.util.Map options)
                                                                 throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourcesSupportingObjectTypes

public static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s,
                                                               java.util.List objectTypes)
                                                        throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourcesSupportingObjectTypes

public static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s,
                                                               java.util.List objectTypes,
                                                               java.util.List current)
                                                        throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourcesSupportingObjectTypes

public static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s,
                                                               java.util.List objectTypes,
                                                               java.util.List current,
                                                               java.util.Map options)
                                                        throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getResourcesSupportingObjectTypes

public static java.util.List getResourcesSupportingObjectTypes(LighthouseContext s,
                                                               java.util.List objectTypes,
                                                               java.util.Map options)
                                                        throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getRoles

public static java.util.List getRoles(LighthouseContext s)
                               throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getRoles

public static java.util.List getRoles(LighthouseContext s,
                                      java.util.List current)
                               throws com.waveset.util.WavesetException
This variant allows a list of names to be included in the returned list. Used to ensure that the current value of a role may continue to be assigned even though the current admin may not have access to those roles.

Throws:
com.waveset.util.WavesetException

getRoles

public static java.util.List getRoles(LighthouseContext s,
                                      java.util.Map options)
                               throws com.waveset.util.WavesetException
Returns a list of roles in the authorization scope of the specified lighthouse context. In addition, a map of options can be specified to further filter the list returned. Supported options include: - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected roles - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together.

Throws:
com.waveset.util.WavesetException

getRoles

public static java.util.List getRoles(LighthouseContext s,
                                      java.lang.String current)
                               throws com.waveset.util.WavesetException
This variant allows a specific name to be included in the returned list. Used to ensure that the current value of a role may continue to be assigned even though the current admin may not have access to that role.

Throws:
com.waveset.util.WavesetException

getRoleTypeNames

public static java.util.List getRoleTypeNames(LighthouseContext s,
                                              java.util.Map options)
                                       throws com.waveset.util.WavesetException
Returns a list of the configured Role type names from the Role Configuration object. The options are: - type - describes the kind of names to return where the choices are: - "name" - internal type name - "displayName" - external type name - "valueMap" - list suitable for use in form field select component's 'valueMap' property - features - only return types that support the specified list of features, where allowed values include role type features specified in the Role Configuration object

Parameters:
s - - context
options - - map of options - see description above for supported options
Returns:
- list of names
Throws:
com.waveset.util.WavesetException

getServletContextPath

public static java.lang.String getServletContextPath(com.waveset.ui.util.RequestState request)

getSessionForActiveSyncResource

public static com.waveset.session.Session getSessionForActiveSyncResource(java.lang.String name)
                                                                   throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getSessionTimeoutString

public static java.lang.String getSessionTimeoutString(java.lang.String milliseconds,
                                                       com.waveset.ui.util.RequestState state)
Takes a string representing sessionTimeout (in milliseconds) for a login application and returns a formatted string suitable for use in the Login App List form.

Parameters:
milliseconds - -- String representation of sessionTimeout in milliseconds
state - -- RequestState context needed to determine the session locale
Returns:
-- Formatted String (e.g. X Hour(s) Y Minute(s) Z Second(s))

getStartupTypesMap

public static java.util.Map getStartupTypesMap()
Get a map that contains the ActiveSync startup types. The key of the map is the name of the startup type and the value of the map is the displayName. This can be used directly as the value of the valueMap property for a Select component.


getSubordinates

public static java.util.List getSubordinates(LighthouseContext s,
                                             java.lang.String manager,
                                             java.util.Map options)
                                      throws com.waveset.util.WavesetException
Get the managerial subordinates of a user.

Parameters:
s - the LighthouseContext
manager - the manager whose subordinates are being requested
options -
  • firstlevel -- the first organizational level to include in the result, 0 means direct reports
  • lastLevel -- the last organizational level to include in the result, -1 means all levels
  • conditions -- an optional map of user attribute conditions which can be used to further filter the list of user names returned.
Returns:
a sorted list of subordinates
Throws:
com.waveset.util.WavesetException

getTimeZoneIdToDisplayNameMap

public static java.util.List getTimeZoneIdToDisplayNameMap(java.util.Locale locale)
This was too complex to manage with express.


getTypeDisplayName

public static java.lang.String getTypeDisplayName(LighthouseContext s,
                                                  java.lang.String typeName)
                                           throws com.waveset.util.WavesetException
Get the display name of a Type, given it name. This method will also check the extended audit types.

Throws:
com.waveset.util.WavesetException

getTypeDisplayNamesWithRights

public static java.util.Map getTypeDisplayNamesWithRights(LighthouseContext s)
                                                   throws com.waveset.util.WavesetException
Returns the set of types with rights that are not deprecated and have a valid java class. The types are returned as a map of entries where each entries key is the type name and value is the type's display name. Can be used for displaying the external name of types in forms while ensuring the correct internal type name is passed to the underlying view.

Parameters:
s - - lighthouse context (session)
Returns:
- map of types where the key is the type name and the value is the types display name
Throws:
com.waveset.util.WavesetException

getTypeNamesWithEncryptedData

public static java.util.List getTypeNamesWithEncryptedData()
                                                    throws com.waveset.util.WavesetException
List object types that support having encrypted data within

Throws:
com.waveset.util.WavesetException

getTypeObjectsAvailableToOrg

public static java.util.List getTypeObjectsAvailableToOrg(LighthouseContext s,
                                                          java.lang.String typestr,
                                                          java.lang.String orgid)
                                                   throws com.waveset.util.WavesetException
Returns a list, for use as allowedValues of a multi-select, of all member objects of the specified org Id and typestr

Throws:
com.waveset.util.WavesetException

getTypesWithRights

public static java.util.List getTypesWithRights(LighthouseContext s)
                                         throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getUnassignedAdminRoles

public static java.util.List getUnassignedAdminRoles(LighthouseContext s,
                                                     java.util.List current)
                                              throws com.waveset.util.WavesetException
Build a list of adminrole names suitable for the assigned adminroles of an administrator. add back in the privately assigned adminroles - since they are already assigned, they can't be excluded or the form will have a constraint violation.

Throws:
com.waveset.util.WavesetException

getUnassignedAdminRoles

public static java.util.List getUnassignedAdminRoles(LighthouseContext s,
                                                     java.util.List current,
                                                     java.util.Map options)
                                              throws com.waveset.util.WavesetException
Build a list of capability names suitable for the assigned adminroles of an administrator. add back in the privately assigned adminroles - since they are already assigned, they can't be excluded or the form will have a constraint violation. also allows passing options such as whether or not to filter adminroles not assigned to the current subject or not (e.g. "onlyAssignedToCurrentSubject" true or false)

Throws:
com.waveset.util.WavesetException

getUnassignedApplications

public static java.util.List getUnassignedApplications(LighthouseContext s,
                                                       java.util.List roleNames,
                                                       java.util.List current)
                                                throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getUnassignedApplications

public static java.util.List getUnassignedApplications(LighthouseContext s,
                                                       java.util.List roleNames,
                                                       java.util.Map options)
                                                throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getUnassignedApplications

public static java.util.List getUnassignedApplications(LighthouseContext s,
                                                       java.util.Map options)
                                                throws com.waveset.util.WavesetException
Build a list of application names suitable for the "private applications" of a user. Takes the following options: current: list of current application names. The returned list will always contain each of these applications regardless of the other options. currentRoles: list of current role names. The returned list will NOT contain any applications that is assigned via one of these roles UNLESS that application name is on the current list in which case we are forced to add it back on. conditions: which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together.

Throws:
com.waveset.util.WavesetException

getUnassignedApplications

public static java.util.List getUnassignedApplications(LighthouseContext s,
                                                       java.lang.String roleName)
                                                throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getUnassignedApplications

public static java.util.List getUnassignedApplications(LighthouseContext s,
                                                       java.lang.String roleName,
                                                       java.util.List current)
                                                throws com.waveset.util.WavesetException
Build a list of names suitable for the "private applications" of a user. This is the list of all accessible applications minus the ones already assigned to the user through their role. !! This will need to flatten the Application hierarchy like we do for the Resource hierarchy. PWD: we need to add in private applications to the available list.

Throws:
com.waveset.util.WavesetException

getUnassignedCapabilities

public static java.util.List getUnassignedCapabilities(LighthouseContext s)
                                                throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

getUnassignedCapabilities

public static java.util.List getUnassignedCapabilities(LighthouseContext s,
                                                       java.util.List current)
                                                throws com.waveset.util.WavesetException
Build a list of capability names suitable for the assigned capabilities of an administrator. add back in the privately assigned capabilities - since they are already assigned, they can't be excluded or the form will have a constraint violation.

Throws:
com.waveset.util.WavesetException

getUnassignedCapabilities

public static java.util.List getUnassignedCapabilities(LighthouseContext s,
                                                       java.util.List current,
                                                       java.util.Map options)
                                                throws com.waveset.util.WavesetException
Build a list of capability names suitable for the assigned capabilities of an administrator. add back in the privately assigned capabilities - since they are already assigned, they can't be excluded or the form will have a constraint violation. also allows passing options such as whether or not to filter Capabilities not assigned to the current subject or not (e.g. "onlyAssignedToCurrentSubject" true or false)

Throws:
com.waveset.util.WavesetException

getUnassignedCapabilities

public static java.util.List getUnassignedCapabilities(LighthouseContext s,
                                                       java.util.List current,
                                                       java.lang.String currentName)
                                                throws com.waveset.util.WavesetException
Build a list of capability names suitable for the assigned capabilities of an administrator. add back in the privately assigned capabilities - since they are already assigned, they can't be excluded or the form will have a constraint violation. Finally, this method will remove the name specified as "currentName" if non-null from the list (this is needed when editing a capability, you don't want the capability you're editing to be included in the list of avaialble capabilities to assign).

Throws:
com.waveset.util.WavesetException

getUnassignedResources

public static java.util.List getUnassignedResources(LighthouseContext s,
                                                    java.util.Map options)
                                             throws com.waveset.util.WavesetException
Build a list of resource names suitable for the "private resources" of a user. Takes the following options: current: list of current resource names. The returned list will always contain each of these resources regardless of the other options. currentRoles: list of current role names. The returned list will NOT contain any resource that is assigned via one of these roles UNLESS that resource name is on the current list in which case we are forced to add it back on. currentResourceGroups: list of current resource group names. The returned list will NOT contain any resource that is assigned via one of these resource gruops UNLESS that resource name is on the current list in which case we are forced to add it back on. availableToOrgScope: list of organization names (or paths or displayNames if unique). Only resources that are available to organizations on this list will be returned (except for resources on the current list which are always returned). conditions: which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together.

Throws:
com.waveset.util.WavesetException

getUsers

public static java.util.List getUsers(LighthouseContext s)
                               throws com.waveset.util.WavesetException
Returns a list of users in the authorization scope of the specified lighthouse context. The list will include all users with or without capabilities assigned (e.g. admins).

Throws:
com.waveset.util.WavesetException

getUsers

public static java.util.List getUsers(LighthouseContext s,
                                      java.util.Map options)
                               throws com.waveset.util.WavesetException
Returns a list of users in the authorization scope of the specified lighthouse context. By default, the list will include all users with or without capabilities assigned (e.g. admins). In addition, a map of options can be specified to further filter the list returned. Supported options include: - "exclude" this options value can be either "administrators" or "endUsers". If the value is "administrators" the list of users returned will not contain any users that are either directly or indirectly (via adminroles) assigned one or more capabilities and control one or more organizations. If the value is "endUsers" the list returned will only include users directly or indirectly assigned one or more capabilities and controlled organizations. Note that this option is a convienence since the same filter can be applied using the "conditions" options. - "scopingOrg" - this options value should be the name of an organization indicating that the returned list should contain only names of the requested type that are "available to" organizations controlled by an AdminRole that controls the organization matching the value of this query option and is assigned to the current logged in user. a common case for this is when a user is assigned more than one AdminRole and you want to ensure that when creating or editing a user, the member organization of the user being created or edited determines what object names of the requested type are available for assignment. - "current" - a list of one or more currently selected users - "conditions" - which can be specified in the following ways: * where the first entry is the name of a queryable attribute supported by this type of object and the second is the value an object of this type must have for the associated queryable attribute in order to be returned (the operator is assumed to be "equals"). If more than one attrname/value pairs are specified, they will be logically and'ed together. * as a list of AttributeCondition objects. For example MemberObjectGroups equals waveset.organization If more than one AttributeCondition is specified, they will be logically and'ed together. The set of allowed queryable attributes includes all those supported by User (e.g. name, firstname, lastname, role, user_resources, etc.), plus the following pseudo-attributes: - "userType" - allowed values include "administrator" and "approver" - "similarTo" - returns users that control at least one of the organizations controlled by the user specified as the value of the attribute, where value is expected to be a user name.

Throws:
com.waveset.util.WavesetException

hasAllPermissions

public static java.lang.Boolean hasAllPermissions(LighthouseContext s,
                                                  java.lang.String type,
                                                  java.util.List rights)
                                           throws com.waveset.util.WavesetException
Returns true if the current authenticated Lighthouse user has all of the specified permission; otherwise, returns false.

Throws:
com.waveset.util.WavesetException

hasAllPermissionsSubType

public static java.lang.Boolean hasAllPermissionsSubType(LighthouseContext s,
                                                         java.lang.String type,
                                                         java.util.List rights)
                                                  throws com.waveset.util.WavesetException
Returns true if the current authenticated Lighthouse user has all the specified rights to the specified type (or any of its authtype subtypes). It does not imply that the subject has the specified rights to all objects of the specified type or any of its authtype subtypes, since a given object may or may not be in the subject's scope of control or if it is the subject may not have the specified right to the object in that scope.

Therefore, this method is primarily used to determine if the subject has the specified rights to at least one object of the specified type or any of its authtype subtypes.

Throws:
com.waveset.util.WavesetException

hasAnyPermission

public static java.lang.Boolean hasAnyPermission(LighthouseContext s,
                                                 java.lang.String type,
                                                 java.util.List rights)
                                          throws com.waveset.util.WavesetException
Returns true if the current authenticated Lighthouse user has any of the specified permission; otherwise, returns false.

Throws:
com.waveset.util.WavesetException

hasAnyPermissionSubType

public static java.lang.Boolean hasAnyPermissionSubType(LighthouseContext s,
                                                        java.lang.String type,
                                                        java.util.List rights)
                                                 throws com.waveset.util.WavesetException
Returns true if the current authenticated Lighthouse user has any of the specified rights to the specified type (or any of its authtype subtypes). It does not imply that the subject has the specified rights to all objects of the specified type or any of its authtype subtypes, since a given object may or may not be in the subject's scope of control or if it is the subject may not have the specified right to the object in that scope.

Therefore, this method is primarily used to determine if the subject has any of the specified rights to at least one object of the specified type or any of its authtype subtypes.

Throws:
com.waveset.util.WavesetException

hasCapabilities

public static java.lang.Boolean hasCapabilities(LighthouseContext s,
                                                java.util.List capabilities)
                                         throws com.waveset.util.WavesetException
Returns true if the current authenticated Lighthouse user has the all of the specified capabilities; otherwise, returns false. The supported list of capabilities include those returned by listing all objects of type AdminGroup (e.g. "Account Administrator")

Throws:
com.waveset.util.WavesetException

hasCapability

public static java.lang.Boolean hasCapability(LighthouseContext s,
                                              java.lang.String capability)
                                       throws com.waveset.util.WavesetException
Returns true if the current authenticated Lighthouse user has the specified capability; otherwise, returns false. The supported list of capabilities include those returned by listing all objects of type AdminGroup (e.g. "Account Administrator")

Throws:
com.waveset.util.WavesetException

hasPermissionToAnyAuthTypeSubType

public static java.lang.Boolean hasPermissionToAnyAuthTypeSubType(LighthouseContext s,
                                                                  java.lang.String type,
                                                                  java.util.List rights)
                                                           throws com.waveset.util.WavesetException
Returns true if the current authenticated Lighthouse user has the specified rights to the specified type or any of its authtype subtypes. It does not imply that the subject has the specified rights to all objects of the specified type or any of its authtype subtypes, since a given object may or may not be in the subject's scope of control or if it is the subject may not have the specified right to the object in that scope.

Therefore, this method is primarily used to determine if the subject has the specified rights to at least one object of the specified type or any of its authtype subtypes.

Throws:
com.waveset.util.WavesetException

isAccountAttributeMultiValued

public static boolean isAccountAttributeMultiValued(LighthouseContext session,
                                                    java.lang.String fqAttrName)
Determines multivalue property of an attribute

Parameters:
session -
fqAttrName - fully qualified attribute name expressed something like user.waveset.roles or user.accounts[ldap dir].name
Returns:
string 'true' if the attribute is multivalued

isFeatureSupported

public static boolean isFeatureSupported(LighthouseContext ctx,
                                         java.lang.String resourceName,
                                         java.lang.String featureName)
                                  throws com.waveset.util.WavesetException
Determine whether the given resource supports and has the given feature enabled.

Parameters:
ctx - The LighthouseContext to use.
resourceName - The name of the resource.
featureName - The constant of the feature. See ResourceAdapter.Features for a list of features.
Returns:
True if give resource supports the and has the given feature enabled, false otherwise.
Throws:
com.waveset.util.WavesetException - If the resource cannot be loaded.
See Also:
ResourceAdapter.Features

isSRMIntegrated

public static boolean isSRMIntegrated(LighthouseContext ctx)
                               throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

isSubordinate

public static boolean isSubordinate(LighthouseContext ctx,
                                    java.lang.String userName,
                                    java.util.Map options)
                             throws com.waveset.util.WavesetException
Determines if a user is subordinate to the caller by traversing the idmManager hierarchy.

Parameters:
ctx - the LighthouseContext
userName - the user to be tested for subordinateness
options -
  • firstlevel -- this option is ignored in this call. It is mentioned only because getSubordinates() honors it.
  • lastLevel -- maximum depth (from caller) to check, -1 means all levels
    Returns:
    true if userName is a subordinate of the caller, false otherwise.
    Throws:
    com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(LighthouseContext session,
                                                 java.lang.String objectType,
                                                 java.util.List resourceList,
                                                 java.util.Map options,
                                                 java.lang.String cacheList)
                                          throws com.waveset.util.WavesetException
This method returns a list of resource object names of the specified resource object type from the specified list of resources (resourceList of Ids or names). In addition, one can specify a set of one or more key / string value pairs specific to the resource from which the object list is being requested. For example, - context ==> dn from where to start collecting list of object names to return - shortname ==> if true, only common name will be returned for dn type object names Note that there is no Waveset authorization check in this method since we are not returning any data controlled by Waveset. The method will run as the currently authenticated administrator (e.g. subject) This method will first attempt to get the list of resource objects of the specified type (e.g. group, distlist, etc.) from the server's resourceObjectListCache. If found, this list will be returned. If not found, the method will invoke the listResourceObjects method on each resource, merge, sort, and remove duplicates on the resulting lists, and finally cache this new list in the server's resourceObjectListCache for any subsequent requests for the same resource object type from the same resource(s). If the caller wants to ensure they are getting the resource object list from the resources and not from the server's cache, they should first invoke the clearResourceObjectListCache() method or set the cacheList argument to 'false'.

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(LighthouseContext session,
                                                 java.lang.String objectType,
                                                 java.util.List resourceList,
                                                 java.util.Map options,
                                                 java.lang.String cacheList,
                                                 java.lang.String clearCacheIfExists)
                                          throws com.waveset.util.WavesetException
Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(LighthouseContext session,
                                                 java.lang.String objectType,
                                                 java.lang.String resourceId,
                                                 java.util.Map options,
                                                 java.lang.String cacheList)
                                          throws com.waveset.util.WavesetException
Variant that takes a single resourceid and an existing session.

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(LighthouseContext session,
                                                 java.lang.String objectType,
                                                 java.lang.String resourceId,
                                                 java.util.Map options,
                                                 java.lang.String cacheList,
                                                 java.lang.String clearCacheIfExists)
                                          throws com.waveset.util.WavesetException
Variant that takes a single resourceid and an existing session.

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(LighthouseContext session,
                                                 java.lang.String objectType,
                                                 java.lang.String resourceId,
                                                 java.util.Map options,
                                                 java.lang.String cacheList,
                                                 java.lang.String cacheTimeout,
                                                 java.lang.String clearCacheIfExists)
                                          throws com.waveset.util.WavesetException
Variant that takes a single resourceid and an existing session; Supports cacheTimeout (e.g. 60000 = 1 minute)

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(java.lang.String subjectString,
                                                 java.lang.String objectType,
                                                 java.util.List resourceList,
                                                 java.util.Map options,
                                                 java.lang.String cacheList)
                                          throws com.waveset.util.WavesetException
Variant that takes a Subject string and creates a new Session.

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(java.lang.String subjectString,
                                                 java.lang.String objectType,
                                                 java.util.List resourceList,
                                                 java.util.Map options,
                                                 java.lang.String cacheList,
                                                 java.lang.String clearCacheIfExists)
                                          throws com.waveset.util.WavesetException
Variant that takes a Subject string and creates a new Session.

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(java.lang.String subjectString,
                                                 java.lang.String objectType,
                                                 java.lang.String resourceId,
                                                 java.util.Map options,
                                                 java.lang.String cacheList)
                                          throws com.waveset.util.WavesetException
Variant that takes a single resourceId and a subject string.

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(java.lang.String subjectString,
                                                 java.lang.String objectType,
                                                 java.lang.String resourceId,
                                                 java.util.Map options,
                                                 java.lang.String cacheList,
                                                 java.lang.String clearCacheIfExists)
                                          throws com.waveset.util.WavesetException
Variant that takes a single resourceId and a subject string.

Throws:
com.waveset.util.WavesetException

listResourceObjects

public static java.util.List listResourceObjects(java.lang.String subjectString,
                                                 java.lang.String objectType,
                                                 java.lang.String resourceId,
                                                 java.util.Map options,
                                                 java.lang.String cacheList,
                                                 java.lang.String cacheTimeout,
                                                 java.lang.String clearCacheIfExists)
                                          throws com.waveset.util.WavesetException
Variant that takes a single resourceId and a subject string; Supports cacheTimeout (e.g. 60000 = 1 minute)

Throws:
com.waveset.util.WavesetException

listServers

public static java.util.List listServers(LighthouseContext s)
                                  throws com.waveset.util.WavesetException
Returns:
the names of known servers.
Throws:
com.waveset.util.WavesetException

setRoleEventDate

public static java.util.Date setRoleEventDate(LighthouseContext s,
                                              java.util.List<GenericObject> roleInfos,
                                              java.lang.String roleName,
                                              java.lang.String eventName,
                                              java.util.Map options)
                                       throws com.waveset.util.WavesetException
Sets a role event date on a role which may have contained roles that need to inherit the set event date. Contained role infos assigned by this role may also be assigned by other roles. Each contained role assigned by this role will be called to set its event date, but it may inherit a date from another directly assigned role or optional role. beforeDate - Ensure the given date is before this date afterDate - Ensure the given date is after this date inheritLatestDate - true|false - The earliest date is used by default when determining an inherited date. Set this option to true to use the latest date. This is needed for end date calculations like "deactivate"

Throws:
com.waveset.util.WavesetException

sort

public static java.util.List sort(java.util.List l)
Sort a List by its natural ordering and return it.

Parameters:
l - The List to sort.
Returns:
The sorted List.

stripOrgPath

public static java.lang.String stripOrgPath(java.lang.String path)
Given an organization name in "path" form, remove the path prefix.


testObject

public static java.lang.String testObject(LighthouseContext s,
                                          java.lang.String typeName,
                                          java.lang.String id)
Created for the Dell demo, where end users need to be able to launch processes to create new users, and need to test to see if a user with a certain name already exists. Returns the string "true" if the object exists, or null.


testUser

public static java.lang.String testUser(LighthouseContext s,
                                        java.lang.String id)

workItemTypeIsOrIsChildOf

public static boolean workItemTypeIsOrIsChildOf(LighthouseContext s,
                                                java.lang.String selectedWorkItemType,
                                                java.lang.String workItemType)
                                         throws com.waveset.util.WavesetException
Returns true if the 'selectedWorkItemType' is either the same as or an extension to / child workItemType of 'workItemType'

Throws:
com.waveset.util.WavesetException