/*
* 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 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
implements Attribute
{
// The attribute type.
// The entry with which this virtual attribute is associated.
// The virtual attribute provider for this virtual attribute.
// The virtual attribute rule for this virtual attribute.
/**
* 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;
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
return attributeType;
}
/**
* {@inheritDoc}
*/
{
return getName();
}
/**
* {@inheritDoc}
*/
{
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;
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
return false;
}
/**
* {@inheritDoc}
*/
public boolean hasOptions()
{
return false;
}
/**
* {@inheritDoc}
*/
public boolean isEmpty()
{
}
/**
* {@inheritDoc}
*/
public boolean isVirtual()
{
return true;
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
subFinal);
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
public int size()
{
if (!provider.isMultiValued())
{
}
else
{
}
}
/**
* {@inheritDoc}
*/
{
boolean firstValue = true;
for (AttributeValue value : this)
{
if (!firstValue)
{
}
firstValue = false;
}
}
}