/**
* 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: AttributeLookupCondition.java,v 1.1 2009/08/19 05:40:32 veiming Exp $
*/
/*
* Portions Copyrighted 2014-2015 ForgeRock AS.
*/
/**
* This condition evaluates if a given attribute from subject matches with
* the one in resource.
*/
/**
* User Macro
*/
/**
* Resource Macro
*/
/**
* Constructor.
*/
public AttributeLookupCondition() {
}
/**
* Constructor.
*
* @param key Matching key.
* @param value Matching value.
*/
}
/**
* 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 <code>ConditionDecision</code> of
* <code>EntitlementCondition</code> evaluation.
*
* @param realm Realm name.
* @param subject EntitlementCondition who is under evaluation.
* @param resourceName Resource name.
* @param environment Environment parameters.
* @return <code>ConditionDecision</code> of
* <code>EntitlementCondition</code> evaluation
* @throws EntitlementException if error occurs.
*/
throws EntitlementException {
// e.g. $USER.postaladdress;
if (idxUserMacro != -1) {
} else {
}
// e.g. $RES.postaladdress;
}
return new ConditionDecision(
}
return new ConditionDecision(false, advices);
}
if (o instanceof String) {
}
}
}
return attrValue;
}
/**
* Returns matching key.
*
* @return matching key.
*/
return key;
}
/**
* Returns OpenAM policy Condition name.
*
* @return subject name as used in OpenAM policy,
* this is relevant only when UserECondition was created from
* OpenAM policy Condition.
*/
return pConditionName;
}
/**
* Returns matching value.
*
* @return matching value.
*/
return value;
}
/**
* Sets matching key.
*
* @param key Matching key.
*/
}
/**
* Sets OpenAM policy Condition name
* @param pConditionName subject name as used in OpenAM policy,
* this is relevant only when UserECondition was created from
* OpenAM policy Condition.
*/
this.pConditionName = pConditionName;
}
/**
* Set matching value.
* @param value Matching value.
*/
}
/**
* Returns JSONObject mapping of the object.
*
* @return JSONObject mapping of the object.
*/
return jo;
}
/**
* 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;
}
}
return false;
}
} else {
return false;
}
}
if (pConditionName == null) {
return false;
}
} else {
return false;
}
}
return true;
}
/**
* Returns hash code of the object.
*
* @return hash code of the object.
*/
public int hashCode() {
}
}
if (pConditionName != null) {
}
return code;
}
/**
* Returns string representation of the object.
*
* @return string representation of the object.
*/
try {
} catch (JSONException e) {
}
return s;
}
}
}
}
}