/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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, add 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: DelegationModelImpl.java,v 1.3 2008/06/25 05:42:53 qcheng Exp $
*
*/
/* - LOG COMPLETE - */
public class DelegationModelImpl
extends AMModelBase
implements DelegationModel
{
}
/**
* Returns delegation subjects under a realm. Returning a set of
* universal ID of subject.
*
* @param realmName Name of realm.
* @param pattern Wildcard for matching subject name.
* @return delegation subjects under a realm.
* @throws AMConsoleException if subject universal ID cannot be obtained.
*/
throws AMConsoleException {
try {
getUserSSOToken(), realmName);
} catch (SSOException e) {
throw new AMConsoleException(strError);
} catch (DelegationException e) {
throw new AMConsoleException(strError);
}
}
/**
* Returns a set of privileges of an identity.
*
* @param realmName Name of realm.
* @param uid Universal ID of the identity.
* @return a set of privileges of an identity.
* @throws AMConsoleException if privilege cannot be determined.
*/
throws AMConsoleException {
try {
getUserSSOToken(), realmName);
} catch (SSOException e) {
logEvent("SSO_EXCEPTION_GET_PRIVILEGES_OF_DELEGATION_SUBJECT",
paramsEx);
throw new AMConsoleException(strError);
} catch (DelegationException e) {
"DELEGATION_EXCEPTION_GET_PRIVILEGES_OF_DELEGATION_SUBJECT",
paramsEx);
throw new AMConsoleException(strError);
}
}
/**
* Set privileges of an identity.
*
* @param realmName Name of realm.
* @param uid Universal ID of the identity.
* @param privileges Map of privilege name to privilege value.
* @throws AMConsoleException if privilege cannot be set.
*/
throws AMConsoleException {
try {
getUserSSOToken(), realmName);
boolean modified = false;
if (bVal) {
modified = true;
}
} else {
modified = true;
}
}
if (modified) {
}
} else if (bVal) {
}
}
} catch (SSOException e) {
throw new AMConsoleException(strError);
} catch (DelegationException e) {
logEvent("DELEGATION_EXCEPTION_MODIFY_DELEGATION_PRIVILEGE",
paramsEx);
throw new AMConsoleException(strError);
}
}
) {
) {
dp = p;
}
}
return dp;
}
}