container/profiles/src/main/java/org/mobicents/slee/container/profile/ProfileTableImpl.java
private ProfileAttribute getProfileAttribute(String attributeName,
			Object attributeValue) throws NullPointerException, UnrecognizedAttributeException,
			AttributeTypeMismatchException {

		if (attributeName == null) {
			throw new NullPointerException("attribute name is null");
		}
		if (attributeValue == null) {
			throw new NullPointerException("attribute value is null");
		}
		
		ProfileAttribute profileAttribute = component.getProfileAttributes().get(attributeName);
		if (profileAttribute == null) {
			throw new UnrecognizedAttributeException(component.toString()+" does not defines an attribute named "+attributeName);
		}
		else {
			Class<?> allowedProfileAttributeType = profileAttribute.getNonPrimitiveType().isArray() ? profileAttribute.getNonPrimitiveType().getComponentType() : profileAttribute.getNonPrimitiveType() ; 
			if (!allowedProfileAttributeType.getName().equals(attributeValue.getClass().getName())) {
				throw new AttributeTypeMismatchException(component.toString()+" defines an attribute named "+attributeName+" with value type "+profileAttribute.getType()+", the specified value is of type "+attributeValue.getClass());
			}
			else {
				return profileAttribute;
			}
		}
	}
private ProfileAttribute getProfileAttribute(String attributeName,
			Object attributeValue) throws NullPointerException, UnrecognizedAttributeException,
			AttributeTypeMismatchException {

		if (attributeName == null) {
			throw new NullPointerException("attribute name is null");
		}
		if (attributeValue == null) {
			throw new NullPointerException("attribute value is null");
		}
		
		ProfileAttribute profileAttribute = component.getProfileAttributes().get(attributeName);
		if (profileAttribute == null) {
			throw new UnrecognizedAttributeException(component.toString()+" does not defines an attribute named "+attributeName);
		}
		else {
			Class<?> allowedProfileAttributeType = profileAttribute.getNonPrimitiveType().isArray() ? profileAttribute.getNonPrimitiveType().getComponentType() : profileAttribute.getNonPrimitiveType() ; 
			if (!allowedProfileAttributeType.getName().equals(attributeValue.getClass().getName())) {
				throw new AttributeTypeMismatchException(component.toString()+" defines an attribute named "+attributeName+" with value type "+profileAttribute.getType()+", the specified value is of type "+attributeValue.getClass());
			}
			else {
				return profileAttribute;
			}
		}
	}
private ProfileAttribute getProfileAttribute ( String attributeName , Object attributeValue ) throws NullPointerException , UnrecognizedAttributeException , AttributeTypeMismatchException { if ( attributeName == null ) { throw new NullPointerException ( "attribute name is null" ) ; } if ( attributeValue == null ) { throw new NullPointerException ( "attribute value is null" ) ; } ProfileAttribute profileAttribute = component . getProfileAttributes ( ) . get ( attributeName ) ; if ( profileAttribute == null ) { throw new UnrecognizedAttributeException ( component . toString ( ) + " does not defines an attribute named " + attributeName ) ; } else { Class < ? > allowedProfileAttributeType = profileAttribute . getNonPrimitiveType ( ) . isArray ( ) ? profileAttribute . getNonPrimitiveType ( ) . getComponentType ( ) : profileAttribute . getNonPrimitiveType ( ) ; if ( ! allowedProfileAttributeType . getName ( ) . equals ( attributeValue . getClass ( ) . getName ( ) ) ) { throw new AttributeTypeMismatchException ( component . toString ( ) + " defines an attribute named " + attributeName + " with value type " + profileAttribute . getType ( ) + ", the specified value is of type " + attributeValue . getClass ( ) ) ; } else { return profileAttribute ; } } }
Retrieves the {@link ProfileAttribute} from the component, matching specified attribute name and value type
@param attributeName
@param attributeValue
@return
@throws NullPointerException
@throws UnrecognizedAttributeException
@throws AttributeTypeMismatchException
Retrieves the {