VirtualAttribute.java revision d25372dc8e65a9ed019a88fdf659ca61313f1b31
/*
* 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
* 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
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. 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 Sun Microsystems, Inc.
*/
/**
* 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.
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;
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
{
}
/**
* {@inheritDoc}
*/
public AttributeType getAttributeType()
{
return attributeType;
}
/**
* Retrieves the entry in which this virtual attribute exists.
*
* @return The entry in which this virtual attribute exists.
*/
{
return entry;
}
/**
* {@inheritDoc}
*/
public String getNameWithOptions()
{
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()
{
}
/**
* {@inheritDoc}
*/
{
boolean firstValue = true;
for (AttributeValue value : this)
{
if (!firstValue)
{
}
firstValue = false;
}
}
}