ReferralPrivilegeManager.java revision 6844ba67b94a6962decb2128480f6b8a29053949
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, addReferral the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: ReferralPrivilegeManager.java,v 1.7 2010/01/20 17:01:35 veiming Exp $
*/
/**
* Portions Copyrighted 2012-2014 ForgeRock AS
*/
/**
* Referral Privilege Manager manages referral privilege.
*/
private Subject adminSubject;
/**
* Constructor.
*
* @param realm Realm.
* @param subject subject to initilialize the privilege manager with
*/
this.adminSubject = subject;
}
/**
* Add a referral privilege.
*
* @param referral referral privilege to add.
* @throws EntitlementException if referral privilege cannot be added.
*/
if (principalName != null) {
}
}
}
}
}
}
private void validate(ReferralPrivilege referral, ResourceName comp, String res, Set<String> refResources)
throws EntitlementException {
res += "*";
}
return;
}
}
}
}
}
}
/**
* Finds a referral privilege by its unique name.
*
* @param name name of the referral privilege to be returned
* @throws com.sun.identity.entitlement.EntitlementException if referral privilege is not found.
*/
}
/**
* Checks if a privilege with the specified name can be found.
*
* @param name name of the privilege.
* @throws com.sun.identity.entitlement.EntitlementException if search failed.
*/
}
/**
* Remove a referral privilege.
*
* @param name name of the referral privilege to be removed.
* @throws EntitlementException if referral privilege cannot be removed.
*/
}
}
private void removeApplicationFromSubRealm(ReferralPrivilege referral) throws EntitlementException {
}
}
}
/**
* Modify a referral privilege.
*
* @param referral the referral privilege to be modified
* @throws com.sun.identity.entitlement.EntitlementException if referral privilege cannot be modified.
*/
}
}
}
}
/**
* Returns a set of referral privilege names for a given search criteria.
*
* @param filter Set of search filter.
* @param searchSizeLimit Search size limit.
* @param searchTimeLimit Search time limit in seconds.
* @return a set of referral privilege names for a given search criteria.
* @throws EntitlementException if search failed.
*/
throws EntitlementException {
//TODO Search size and time limit
}
/**
* Returns a set of privilege names for a given search criteria.
*
* @param filter Set of search filter.
* @return a set of privilege names for a given search criteria.
* @throws EntitlementException if search failed.
*/
//TODO Search size and time limit
}
if (m != null) {
}
}
if (m != null) {
}
}
}
}
}
}
}
/**
* Returns the referred privileges for a given realm.
*/
public Map<String, Set<ReferralPrivilege>> getReferredPrivileges(String targetRealm) throws EntitlementException {
return Collections.EMPTY_MAP;
}
EntitlementConfiguration ec = EntitlementConfiguration.getInstance(PrivilegeManager.superAdminSubject, realm);
}
}
return results;
}
throws EntitlementException {
ReferralPrivilegeManager mgr = new ReferralPrivilegeManager(baseRealm, PrivilegeManager.superAdminSubject);
if (r.equalsIgnoreCase(targetRealm)) {
break;
}
}
}
return results;
}
}