public final class ResourceUtils
extends java.lang.Object
weblogic.security.spi.Resource
objects
and the resource ids created by the Resource
objects. Modifier and Type | Class and Description |
---|---|
private static class |
ResourceUtils.InvocationHandlerImpl |
static interface |
ResourceUtils.SearchHelper |
Constructor and Description |
---|
ResourceUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeSearchChars(java.lang.String searchData)
Escape special characters for search so they can be used in the data.
|
static ResourceUtils.SearchHelper |
getApplicationSearchHelper(java.lang.String appName)
Obtain search information for search by application name.
|
static ResourceUtils.SearchHelper |
getChildSearchHelper(java.lang.String resourceId)
Obtain search helper for finding child resources.
|
static ResourceUtils.SearchHelper |
getComponentSearchHelper(java.lang.String compName,
java.lang.String compType,
java.lang.String appName)
Obtain search information for search by application component.
|
static java.util.Map |
getMapFromResourceId(java.lang.String resourceId)
Get a
Map of keys and key values based on
a security resource identifier. |
static java.lang.String[] |
getParentResourceIds(java.lang.String resourceId)
Get an ordered list of the parent security resource identifiers
based on the supplied resource identifier.
|
static ResourceUtils.SearchHelper |
getRepeatingActionsSearchHelper(java.lang.String resourceId)
Obtain search information to find child resources with repeating actions.
|
static java.lang.String |
getResourceIdFromMap(java.util.Map resourceData)
Get a security resource identifier based on resource type and
resource key values present in a
Map . |
static ResourceIdInfo |
getResourceIdInfo(java.lang.String resType) |
static java.lang.String |
getResourceIdNameFilter(java.lang.String resourceId)
Validate and get a searchable resource identifier.
|
static java.lang.String[] |
getResourceKeyNames(java.lang.String resourceType)
Get an ordered list of all key names for a resource type.
|
static java.lang.String |
getResourceTypeNameFilter(java.lang.String resType)
Obtain resource name filter for search by resource type.
|
static Resource |
getScopedResource(java.lang.String resourceId)
Validate and get a resource object to be used for scoped role search.
|
static boolean |
isResourceTypeRegistered(weblogic.security.acl.internal.AuthenticatedSubject subject,
ResourceIdInfo info)
Check if the resource type is registered.
|
static java.lang.String[] |
listRegisteredResourceTypes()
Obtain the currently registered resource types.
|
static void |
registerResourceType(weblogic.security.acl.internal.AuthenticatedSubject subject,
ResourceIdInfo info)
Register the resource type information.
|
static java.lang.String |
unescapeChars(java.lang.String data)
Unescape any special characters in the data.
|
public static java.lang.String[] listRegisteredResourceTypes()
public static boolean isResourceTypeRegistered(weblogic.security.acl.internal.AuthenticatedSubject subject, ResourceIdInfo info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void registerResourceType(weblogic.security.acl.internal.AuthenticatedSubject subject, ResourceIdInfo info) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static java.lang.String getResourceIdFromMap(java.util.Map resourceData) throws java.lang.IllegalArgumentException
Map
.resourceData
- a Map
representing security resource data.Resource.toString()
.java.lang.IllegalArgumentException
- when unable to create a resource id
because of an unknown resource type or invalid resource key.Resource
public static java.util.Map getMapFromResourceId(java.lang.String resourceId) throws java.lang.IllegalArgumentException
Map
of keys and key values based on
a security resource identifier.resourceId
- a security resource identifier.java.lang.IllegalArgumentException
- for an invalid resource id.Resource
public static java.lang.String[] getResourceKeyNames(java.lang.String resourceType) throws java.lang.IllegalArgumentException
Map
.resourceType
- a security resource type.java.lang.IllegalArgumentException
- for an invalid resource type.Resource
public static java.lang.String[] getParentResourceIds(java.lang.String resourceId) throws java.lang.IllegalArgumentException
The immediate parent is located at the starting array element and an empty (zero length) array indicates no parents.
resourceId
- a security resource identifierjava.lang.IllegalArgumentException
- for an invalid resource idResource
public static java.lang.String getResourceTypeNameFilter(java.lang.String resType) throws java.lang.IllegalArgumentException
resType
- a resource object type stringString
for searching resources of resType
java.lang.IllegalArgumentException
public static ResourceUtils.SearchHelper getApplicationSearchHelper(java.lang.String appName) throws java.lang.IllegalArgumentException
appName
- a wildcardable application name stringSearchHelper
with the required datajava.lang.IllegalArgumentException
public static ResourceUtils.SearchHelper getComponentSearchHelper(java.lang.String compName, java.lang.String compType, java.lang.String appName) throws java.lang.IllegalArgumentException
compName
- a wildcardable component name stringcompType
- a Java EE component type stringappName
- an application name stringSearchHelper
with the required datajava.lang.IllegalArgumentException
public static ResourceUtils.SearchHelper getChildSearchHelper(java.lang.String resourceId) throws java.lang.IllegalArgumentException
resourceId
- a security resource identifierSearchHelper
with the required datajava.lang.IllegalArgumentException
public static ResourceIdInfo getResourceIdInfo(java.lang.String resType)
public static ResourceUtils.SearchHelper getRepeatingActionsSearchHelper(java.lang.String resourceId) throws java.lang.IllegalArgumentException
resourceId
- a security resource identifierSearchHelper
with the required data
or NULL when there is nothing to search for...java.lang.IllegalArgumentException
public static java.lang.String getResourceIdNameFilter(java.lang.String resourceId) throws java.lang.IllegalArgumentException
resourceId
- a security resource identifierString
for searching resources with specified idjava.lang.IllegalArgumentException
public static Resource getScopedResource(java.lang.String resourceId) throws java.lang.IllegalArgumentException
resourceId
- a security resource identifierResource
for the resource id
where null indicates search for global rolesjava.lang.IllegalArgumentException
public static java.lang.String escapeSearchChars(java.lang.String searchData)
searchData
- a string of actual search dataString
with search chars escapedpublic static java.lang.String unescapeChars(java.lang.String data)
data
- a string of data that requires unescapingString
with characters unescaped