Interface PolicyModel

    • Method Detail

      • cachePolicy

        String cachePolicy​(String policyName,
                           String description,
                           boolean isReferral,
                           boolean isActive)
                    throws AMConsoleException
        Caches a policy. Returns the cache ID of the policy object.
        Parameters:
        policyName - Name of policy.
        description - Description of policy.
        isReferral - true if policy is referral typed.
        isActive - true if policy is active.
        Returns:
        cache ID of the policy object.
        Throws:
        AMConsoleException - if policy cannot be cached.
      • cachePolicy

        String cachePolicy​(String realmName,
                           String policyName)
                    throws AMConsoleException
        Caches an existing policy. Returns the cache ID of the policy object.
        Parameters:
        realmName - Name of realm.
        policyName - Name of policy.
        Returns:
        cache ID of the policy object.
        Throws:
        AMConsoleException - if policy cannot be cached.
      • getPolicyNames

        Set getPolicyNames​(String realmName,
                           String filter)
                    throws AMConsoleException
        Returns policy names that are under a realm.
        Parameters:
        realmName - Name of realm.
        filter - Filter string.
        Returns:
        policy names that are under a realm.
        Throws:
        AMConsoleException - if policy names cannot be returned.
      • deletePolicies

        void deletePolicies​(String realmName,
                            Set names)
                     throws AMConsoleException
        Deletes policies.
        Parameters:
        realmName - Name of realm that contains these policies.
        names - Set of policy names to be deleted.
        Throws:
        AMConsoleException - if policies cannot be deleted.
      • canCreateRule

        boolean canCreateRule​(Policy policy,
                              String realmName)
        Returns true if rule can be created in a policy.
        Parameters:
        policy - Policy object.
        realmName - Realm Name.
        Returns:
        true if rule can be created in a policy.
      • getServiceTypeNames

        Map getServiceTypeNames()
        Returns all registered service type names. Map of service name to its localized name.
        Returns:
        all registered service type names.
      • getActionSchemas

        Set getActionSchemas​(Policy policy,
                             String realmName,
                             String name,
                             boolean withResourceName)
        Returns action schemas of service type. name.
        Parameters:
        policy - Policy object.
        realmName - Realm Name.
        name - Name of Service Type.
        withResourceName - true for action names for resource name.
        Returns:
        action schemas of service type.
      • getActionSchemaLocalizedName

        String getActionSchemaLocalizedName​(String name,
                                            ActionSchema actionSchema)
        Returns localized name of action schema.
        Parameters:
        name - Name of Service Type.
        actionSchema - Action Schema.
        Returns:
        localized name of action schema.
      • getChoiceValues

        com.iplanet.jato.view.html.OptionList getChoiceValues​(String name,
                                                              ActionSchema actionSchema)
        Returns a option list of possible choices.
        Parameters:
        name - Name of Service Type.
        actionSchema - Action Schema.
        Returns:
        a option list of possible choices.
      • requiredResourceName

        boolean requiredResourceName​(Policy policy,
                                     String realmName,
                                     String name)
        Returns true if service type requires resource name.
        Parameters:
        policy - Policy object.
        realmName - Realm Name.
        name - Name of Service Type.
        Returns:
        true if service type requires resource name.
      • notRequiredResourceName

        boolean notRequiredResourceName​(Policy policy,
                                        String realmName,
                                        String name)
        Returns true if service type does not require resource name.
        Parameters:
        policy - Policy object.
        realmName - Realm Name.
        name - Name of Service Type.
        Returns:
        true if service typedoes not require resource name.
      • canCreateNewResource

        boolean canCreateNewResource​(String realmName,
                                     String svcTypeName)
        Returns true of new resource can be created under a realm of a given service type.
        Parameters:
        realmName - Name of Realm.
        svcTypeName - Name of Service Type.
        Returns:
        true of new resource can be created under a realm of a given service type.
      • getManagedResources

        List getManagedResources​(String realmName,
                                 String serviceTypeName)
        Returns a list of managed resource names.
        Parameters:
        realmName - Name of realm.
        serviceTypeName - Name of service type.
        Returns:
        a list of managed resource names.
      • getActiveReferralTypes

        Map getActiveReferralTypes​(String realmName)
        Returns a map of active referral types for a realm to its display name.
        Parameters:
        realmName - Name of Realm.
        Returns:
        a map of active referral types for a realm to its display name.
      • getReferralSyntax

        Syntax getReferralSyntax​(String realmName,
                                 String referralType)
        Returns syntax for a referral.
        Parameters:
        realmName - Name of Realm.
        referralType - Name of referral type.
        Returns:
        syntax for a referral.
      • createReferral

        Referral createReferral​(String realmName,
                                String referralType,
                                Set values)
                         throws AMConsoleException
        Returns a referral object.
        Parameters:
        realmName - Name of Realm.
        referralType - Name of referral type.
        values - Values of the referral.
        Returns:
        referral obejct.
        Throws:
        AMConsoleException - if referral cannot be created.
      • getReferralPossibleValues

        ValidValues getReferralPossibleValues​(String realmName,
                                              String referralType,
                                              String filter)
        Returns a set of possible values for a referral type.
        Parameters:
        realmName - Name of Realm.
        referralType - Name of Referral Type.
        filter - wildcards for filtering the results.
        Returns:
        a set of possible values for a referral type.
      • getReferralViewBeanURL

        String getReferralViewBeanURL​(String realmName,
                                      String referralTypeName)
        Returns properties view bean URL of a referral.
        Parameters:
        realmName - Name of realm.
        referralTypeName - Name of Referral Type.
        Returns:
        properties view bean URL of a referral.
      • getDisplayNameForReferralValues

        Map getDisplayNameForReferralValues​(String realmName,
                                            String referralTypeName,
                                            Set values)
        Returns a map of values to localized label.
        Parameters:
        realmName - Name of realm.
        referralTypeName - Name of referral Type.
        values - Valid values.
        Returns:
        a map of values to localized label.
      • getActiveSubjectTypes

        QueryResults getActiveSubjectTypes​(String realmName)
        Returns a map of active subject types for a realm to its display name.
        Parameters:
        realmName - Name of Realm.
        Returns:
        a map of active subject types for a realm to its display name.
      • getSubjectSyntax

        Syntax getSubjectSyntax​(String realmName,
                                String subjectType)
        Returns syntax for a subject.
        Parameters:
        realmName - Name of Realm.
        subjectType - Name of Subject type.
        Returns:
        syntax for a subject.
      • createSubject

        Subject createSubject​(String realmName,
                              String subjectType,
                              Set values)
                       throws AMConsoleException
        Returns a subject object.
        Parameters:
        realmName - Name of Realm.
        subjectType - Name of subject type.
        values - Values of the subject.
        Returns:
        subject obejct.
        Throws:
        AMConsoleException - if subject cannot be created.
      • getSubjectPossibleValues

        ValidValues getSubjectPossibleValues​(String realmName,
                                             String subjectType,
                                             String filter)
                                      throws AMConsoleException
        Returns a set of possible values for a subject type.
        Parameters:
        realmName - Name of Realm.
        subjectType - Name of Subject Type.
        filter - wildcards for filtering the results.
        Returns:
        a set of possible values for a subject type.
        Throws:
        AMConsoleException - if values cannot be obtained.
      • getSubjectTypeName

        String getSubjectTypeName​(String realmName,
                                  Subject subject)
        Returns subject type name of a subject.
        Parameters:
        realmName - Name of realm.
        subject - Subject instance.
        Returns:
        subject type name of a subject.
      • getSubjectViewBeanURL

        String getSubjectViewBeanURL​(String realmName,
                                     Subject subject)
        Returns properties view bean URL of a subject.
        Parameters:
        realmName - Name of realm.
        subject - Subject instance.
        Returns:
        properties view bean URL of a subject.
      • getSubjectViewBeanURL

        String getSubjectViewBeanURL​(String realmName,
                                     String subjectTypeName)
        Returns properties view bean URL of a subject.
        Parameters:
        realmName - Name of realm.
        subjectTypeName - Name of Subject Type.
        Returns:
        properties view bean URL of a subject.
      • getDisplayNameForSubjectValues

        Map getDisplayNameForSubjectValues​(String realmName,
                                           String subjectTypeName,
                                           Set values)
        Returns a map of values to localized label.
        Parameters:
        realmName - Name of realm.
        subjectTypeName - Name of Subject Type.
        values - Valid values.
        Returns:
        a map of values to localized label.
      • getResponseProviderXML

        String getResponseProviderXML​(String realmName,
                                      String providerType,
                                      boolean bCreate,
                                      boolean readonly)
        Returns property sheet XML for response provider.
        Parameters:
        realmName - Name of Realm.
        providerType - Name of response provider name.
        bCreate - true for create view bean.
        readonly - true if administrator can only read permission.
        Returns:
        property sheet XML for response provider.
      • getResponseProviderPropertyNames

        List getResponseProviderPropertyNames​(String realmName,
                                              String providerType)
        Returns property names of a response provider.
        Parameters:
        realmName - Name of Realm.
        providerType - Name of response provider name.
        Returns:
        property names of a response provider.
      • createResponseProvider

        ResponseProvider createResponseProvider​(String realmName,
                                                String providerType,
                                                Map values)
                                         throws AMConsoleException
        Returns a response provider object.
        Parameters:
        realmName - Name of Realm.
        providerType - Name of response provider type.
        values - Values of the response provider.
        Returns:
        response provider object.
        Throws:
        AMConsoleException - if response provider cannot be created.
      • getActiveResponseProviderTypes

        Map getActiveResponseProviderTypes​(String realmName)
        Returns a map of active response provider types for a realm to its display name.
        Parameters:
        realmName - Name of Realm.
        Returns:
        a map of active response provider types for a realm to its display name.
      • getResponseProviderTypeName

        String getResponseProviderTypeName​(String realmName,
                                           ResponseProvider provider)
        Returns response provider type name of a response provider.
        Parameters:
        realmName - Name of realm.
        provider - response provider instance.
        Returns:
        response provider type name of a response provider.
      • getResponseProviderViewBeanURL

        String getResponseProviderViewBeanURL​(String realmName,
                                              ResponseProvider provider)
        Returns properties view bean URL of a response provider.
        Parameters:
        realmName - Name of realm.
        provider - response provider Object.
        Returns:
        properties view bean URL of a response provider.
      • getResponseProviderViewBeanURL

        String getResponseProviderViewBeanURL​(String realmName,
                                              String typeName)
        Returns properties view bean URL of a response provider.
        Parameters:
        realmName - Name of realm.
        typeName - Name of response provider Type.
        Returns:
        properties view bean URL of a response provider.
      • getActiveConditionTypes

        Map getActiveConditionTypes​(String realmName)
        Returns a map of active condition types for a realm to its display name.
        Parameters:
        realmName - Name of Realm.
        Returns:
        a map of active condition types for a realm to its display name.
      • getConditionViewBeanURL

        String getConditionViewBeanURL​(String realmName,
                                       Condition condition)
        Returns properties view bean URL of a condition.
        Parameters:
        realmName - Name of realm.
        condition - Condition Object.
        Returns:
        properties view bean URL of a condition.
      • getConditionViewBeanURL

        String getConditionViewBeanURL​(String realmName,
                                       String conditionTypeName)
        Returns properties view bean URL of a condition.
        Parameters:
        realmName - Name of realm.
        conditionTypeName - Name of Condition Type.
        Returns:
        properties view bean URL of a condition.
      • createCondition

        Condition createCondition​(String realmName,
                                  String conditionType,
                                  Map values)
                           throws AMConsoleException
        Returns a condition object.
        Parameters:
        realmName - Name of Realm.
        conditionType - Name of condition type.
        values - Values of the condition.
        Returns:
        condition object.
        Throws:
        AMConsoleException - if condition cannot be created.
      • getConditionXML

        String getConditionXML​(String realmName,
                               String conditionType,
                               boolean readonly)
        Returns property sheet XML for condition.
        Parameters:
        realmName - Name of Realm.
        conditionType - Name of condition name.
        readonly - true if the administrator has only read only permission.
        Returns:
        property sheet XML for condition.
      • getConditionPropertyNames

        List getConditionPropertyNames​(String realmName,
                                       String conditionType)
        Returns property names of a condition.
        Parameters:
        realmName - Name of Realm.
        conditionType - Name of condition name.
        Returns:
        property names of a condition.
      • getConditionTypeName

        String getConditionTypeName​(String realmName,
                                    Condition condition)
        Returns condition type name of a condition.
        Parameters:
        realmName - Name of realm.
        condition - Condition instance.
        Returns:
        Condition type name of a condition.
      • canCreatePolicy

        String canCreatePolicy​(String realmName)
        Returns a descriptive message if policy cannot be created under a realm.
        Parameters:
        realmName - Name of Realm.
        Returns:
        a descriptive message if policy cannot be created under a realm.
      • getAuthenticationInstances

        Set getAuthenticationInstances​(String realmName)
                                throws AMConsoleException
        Returns set of authentication instances.
        Parameters:
        realmName - Name of Realm.
        Returns:
        set of authentication instances.
        Throws:
        AMConsoleException - if authentication instances cannot be obtained.
      • isPolicyActive

        boolean isPolicyActive​(String realmName,
                               String policyName)
                        throws AMConsoleException
        Returns true if the policy is active, false otherwise.
        Parameters:
        realmName - Realm name.
        policyName - Policy name.
        Returns:
        true if the policy is active, false otherwise.
        Throws:
        AMConsoleException
      • getProtectedResourceNames

        Set getProtectedResourceNames​(String realmName,
                                      String policyName)
                               throws AMConsoleException
        Returns names of resources protected by the policy.
        Parameters:
        realmName - Realm name.
        policyName - Policy name.
        Returns:
        Names of resources protected by the policy.
        Throws:
        AMConsoleException
      • getAuthInstances

        Set getAuthInstances​(String realmName)
        Returns authentication instances configured for the realm.
        Parameters:
        realmName - Name of realm.
        Returns:
        authentication instances configured for the realm.
      • getAuthenticationLevel

        String getAuthenticationLevel​(String realmName,
                                      String name)
        Returns authentication level of an authentication instance.
        Parameters:
        realmName - Name of realm.
        name - Authentication Instance name.
        Returns:
        authentication level of an authentication instance.
      • getRealmNames

        Set getRealmNames​(String base,
                          String filter)
                   throws AMConsoleException
        Returns realms that have names matching with a filter.
        Specified by:
        getRealmNames in interface AMModel
        Parameters:
        base - Base realm name for this search. null indicates root suffix.
        filter - Filter string.
        Returns:
        realms that have names matching with a filter.
        Throws:
        AMConsoleException - if search fails.