8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: ApplicationPrivilege.java,v 1.3 2009/11/19 00:08:51 veiming Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Class representing delegation application privilege
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster {READ, READ_MODIFY, READ_MODIFY_DELEGATE, READ_DELEGATE};
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster private Map<String, Set<String>> applicationResources =
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets entitlement subject.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param entitlementSubjects Entitlement subject
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @throws EntitlementException if subject is null.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void setSubject(Set<SubjectImplementation> entitlementSubjects)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster subjects = new HashSet<SubjectImplementation>();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the name of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return name of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets the description of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param desc Description of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the description of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return description of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the eSubject the privilege
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return eSubject of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public Set<SubjectImplementation> getSubjects() {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the condition the privilege
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return condition of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets the condition the privilege
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param condition condition of the privilege.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void setCondition(EntitlementCondition condition) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns creation date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return creation date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns last modified date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return last modified date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets creation date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param date creation date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets last modified date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param date last modified date.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets the user ID who last modified the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param lastModifiedBy user ID who last modified the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void setLastModifiedBy(String lastModifiedBy) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Sets the user ID who created the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param createdBy user ID who created the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the user ID who last modified the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return user ID who last modified the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Returns the user ID who created the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @return user ID who created the policy.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public Set<String> getResourceNames(String applicationName) {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster return applicationResources.get(applicationName);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Set<String> res = applicationResources.get(applicationName);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster applicationResources.put(applicationName, res);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void setApplicationResources(Map<String, Set<String>> map) {