Examples of AttributeType


Examples of org.tinyradius.dictionary.AttributeType

    if (name == null || name.length() == 0)
      throw new IllegalArgumentException("type name is empty");
    if (value == null || value.length() == 0)
      throw new IllegalArgumentException("value is empty");

    AttributeType type = getDictionary().getAttributeTypeByName(name);
    if (type == null)
      throw new IllegalArgumentException("unknown attribute type '"
          + name + "'");
    if (type.getVendorId() == -1)
      throw new IllegalArgumentException("attribute type '" + name
          + "' is not a Vendor-Specific sub-attribute");
    if (type.getVendorId() != getChildVendorId())
      throw new IllegalArgumentException("attribute type '" + name
          + "' does not belong to vendor ID " + getChildVendorId());

    RadiusAttribute attribute = createRadiusAttribute(getDictionary(),
        getChildVendorId(), type.getTypeCode());
    attribute.setAttributeValue(value);
    addSubAttribute(attribute);
  }
View Full Code Here

Examples of org.tinyradius.dictionary.AttributeType

   */
  public RadiusAttribute getSubAttribute(String type) throws RadiusException {
    if (type == null || type.length() == 0)
      throw new IllegalArgumentException("type name is empty");

    AttributeType t = getDictionary().getAttributeTypeByName(type);
    if (t == null)
      throw new IllegalArgumentException("unknown attribute type name '"
          + type + "'");
    if (t.getVendorId() != getChildVendorId())
      throw new IllegalArgumentException("vendor ID mismatch");

    return getSubAttribute(t.getTypeCode());
  }
View Full Code Here

Examples of uk.ac.soton.itinnovation.pes.data.model.AttributeType

   * Create a new CPU model attribute with hard coded 'x86_80486' value.
   * @return CPU model attribute.
   */
    private AttributeType newCpuModelAttrib()
    {
        AttributeType a = new AttributeType();
        a.setName("cpuModel");
        a.setType(BasicType.STRING);
        a.addAValue(new ValueType("x86_80486", MetricType.EXACT));
        return a;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.