public class RestrictionManager extends Object implements RestrictionConstants
CHANGABLE_DISCRETE, CHANGABLE_NDISCRETE, CHANGABLE_NO, CHANGABLE_RANGED, CHANGABLE_YES, INF_NONE, INF_READ_ONLY, INF_READ_WRITE, INF_WRITE_ONLY, VIEWABLE_MASKED, VIEWABLE_NO, VIEWABLE_YES, XML_NONE, XML_READ_ONLY, XML_READ_WRITE, XML_WRITE_ONLY
Modifier and Type | Method and Description |
---|---|
static RestrictionManager |
getInstance(PortalContext ctx)
Retrieves the RestrictionManager instance, which can
be used to retrieve individual permission settings for the user
logged into Portal for the given connection.
Note that a separate RestrictionManager will be retrieved for each PortalContext passed in - this means this class will handle the case where you are connecting to multiple Portal instances (possibly as different users). |
Restriction |
getRestriction(String type,
String application)
Retrieves the Restriction object representing the passed in
permission string.
|
Restriction |
getRestrictionExists(String type,
String application)
Retrieves the Restriction object representing the passed in
permission string.
|
boolean |
isFeatureDisabled(String featureName,
PortalContext ctx,
String appName)
This method can be used to know whether the Feature is disabled or enabled in the server
|
public static RestrictionManager getInstance(PortalContext ctx)
ctx
- The PortalContext representing your Portal connectionpublic Restriction getRestriction(String type, String application)
type
- The permission string to retrieve (i.e. /accounttool/billnow)application
- Not currently used, so may be null. In the future this
will be used for Role-based permissions so the caller will need to specify
the name of the application they are retrieving this permission for (i.e.
Customer Center, Pricing Center, etc.).public boolean isFeatureDisabled(String featureName, PortalContext ctx, String appName)
FeatureName
- Stringctx
- PortalContextappName
- Stringpublic Restriction getRestrictionExists(String type, String application)
type
- The permission string to retrieve (i.e. /accounttool/billnow)application
- Not currently used, so may be null. In the future this
will be used for Role-based permissions so the caller will need to specify
the name of the application they are retrieving this permission for (i.e.
Customer Center, Pricing Center, etc.).Copyright © 2003, 2023, Oracle and/or its affiliates.