/*
* 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, 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: EntitlementSubjectImpl.java,v 1.2 2009/10/29 19:05:18 veiming Exp $
*
* Portions copyright 2014-2015 ForgeRock AS.
*/
/**
* EntitlementSubject to represent group identity for membership check.
*
* @deprecated As of ForgeRock OpenAM 12.
*/
private boolean exclusive;
/**
* Constructor
*/
public EntitlementSubjectImpl() {
}
/**
* Constructor
*
* @param uuid the universal ID of subject.
*/
}
/**
* Constructor.
*
* @param uuid is the universal ID of subject.
* @param pSubjectName subject name as used in OpenAM policy,
* this is relevant only when it was created from OpenAM policy Subject
*/
this.pSubjectName = pSubjectName;
}
/**
* Sets state of the object
* @param state State of the object encoded as string
*/
try {
} catch (JSONException e) {
}
}
/**
* Returns state of the object.
*
* @return state of the object encoded as string.
*/
return toString();
}
/**
* Returns JSONObject mapping of the object.
*
* @return JSONObject mapping of the object.
*/
if (exclusive) {
}
return jo;
}
/**
* Returns string representation of the object.
*
* @return string representation of the object.
*/
try {
} catch (JSONException e) {
}
return s;
}
/**
* Sets the Identifier.
*
* @param uuid Identifier.
*/
}
/**
* Returns the Identifier.
* @return Identifier.
*/
return uuid;
}
/**
* Sets OpenAM policy subject name of the object
* @param pSubjectName subject name as used in OpenAM policy,
* this is relevant only when GroupSubject was created from
* OpenAM policy Subject
*/
this.pSubjectName = pSubjectName;
}
/**
* Returns OpenAM policy subject name of the object
* @return subject name as used in OpenAM policy,
* this is relevant only when GroupSubject was created from
* OpenAM policy Subject
*/
return pSubjectName;
}
/**
* Returns <code>true</code> if the passed in object is equal to this object
* @param obj object to check for equality
* @return <code>true</code> if the passed in object is equal to this object
*/
return false;
}
return false;
}
return false;
}
} else {
return false;
}
}
if (pSubjectName == null) {
return false;
}
} else {
return false;
}
}
}
/**
* Returns hash code of the object
* @return hash code of the object
*/
public int hashCode() {
int code = 0;
}
if (pSubjectName != null) {
}
if (exclusive) {
} else {
}
return code;
}
for (Principal p : userPrincipals) {
return true;
}
}
return false;
}
/**
* Returns <code>true</code> for exclusive.
*
* @return <code>true</code> for exclusive.
*/
public boolean isExclusive() {
return exclusive;
}
/**
* Sets exclusive.
*
* @param flag <code>true</code> for exclusive.
*/
}
}