VirtualAttribute.java revision e8cead474d5ce2b933d931f0c4743a78e68d9cfc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
* Portions Copyright 2012-2015 ForgeRock AS.
*/
/**
* This class defines a virtual attribute, which is a special kind of
* attribute whose values do not actually exist in persistent storage
* but rather are computed or otherwise obtained dynamically.
*/
mayInstantiate = false,
mayExtend = false,
mayInvoke = true)
public final class VirtualAttribute
extends AbstractAttribute
{
/** The attribute type. */
private final AttributeType attributeType;
/** The entry with which this virtual attribute is associated. */
/** The virtual attribute provider for this virtual attribute. */
private final VirtualAttributeProvider<?> provider;
/** The virtual attribute rule for this virtual attribute. */
private final VirtualAttributeRule rule;
/**
* Creates a new virtual attribute with the provided information.
*
* @param attributeType
* The attribute type for this virtual attribute.
* @param entry
* The entry in which this virtual attribute exists.
* @param rule
* The virtual attribute rule that governs the behavior of
* this virtual attribute.
*/
{
this.attributeType = attributeType;
}
{
}
{
}
{
}
{
}
public AttributeType getAttributeType()
{
return attributeType;
}
public String getNameWithOptions()
{
return getName();
}
{
return Collections.emptySet();
}
/**
* Retrieves the virtual attribute rule that governs the behavior of
* this virtual attribute.
*
* @return The virtual attribute rule that governs the behavior of
* this virtual attribute.
*/
{
return rule;
}
{
}
{
}
{
return false;
}
public boolean hasOptions()
{
return false;
}
public boolean isEmpty()
{
}
public boolean isVirtual()
{
return true;
}
{
}
{
}
{
}
{
}
public int size()
{
if (provider.isMultiValued())
{
}
}
{
}
}