org.jboss.picketlink.idm.model
Class AbstractIdentityType

java.lang.Object
  extended by org.jboss.picketlink.idm.model.AbstractIdentityType
All Implemented Interfaces:
IdentityType
Direct Known Subclasses:
SimpleGroup, SimpleRole, SimpleUser

public abstract class AbstractIdentityType
extends Object
implements IdentityType

Abstract base class for IdentityType implementations


Constructor Summary
AbstractIdentityType()
           
 
Method Summary
 String getAttribute(String name)
           
 Map<String,String[]> getAttributes()
           
 String[] getAttributeValues(String name)
           
 Date getCreationDate()
           
 Date getExpirationDate()
           
 boolean isEnabled()
           
 void removeAttribute(String name)
          Remove attribute with given name
 void setAttribute(String name, String value)
          Set attribute with given name and value.
 void setAttribute(String name, String[] values)
          Set attribute with given name and values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.picketlink.idm.model.IdentityType
getKey
 

Constructor Detail

AbstractIdentityType

public AbstractIdentityType()
Method Detail

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface IdentityType

getExpirationDate

public Date getExpirationDate()
Specified by:
getExpirationDate in interface IdentityType

getCreationDate

public Date getCreationDate()
Specified by:
getCreationDate in interface IdentityType

setAttribute

public void setAttribute(String name,
                         String value)
Description copied from interface: IdentityType
Set attribute with given name and value. Operation will overwrite any previous value. Null value will remove attribute.

Specified by:
setAttribute in interface IdentityType
Parameters:
name - of attribute
value - to be set

setAttribute

public void setAttribute(String name,
                         String[] values)
Description copied from interface: IdentityType
Set attribute with given name and values. Operation will overwrite any previous values. Null value or empty array will remove attribute.

Specified by:
setAttribute in interface IdentityType
Parameters:
name - of attribute
values - to be set

removeAttribute

public void removeAttribute(String name)
Description copied from interface: IdentityType
Remove attribute with given name

Specified by:
removeAttribute in interface IdentityType
Parameters:
name - of attribute

getAttribute

public String getAttribute(String name)
Specified by:
getAttribute in interface IdentityType
Parameters:
name - of attribute
Returns:
attribute values or null if attribute with given name doesn't exist. If given attribute has many values method will return first one

getAttributeValues

public String[] getAttributeValues(String name)
Specified by:
getAttributeValues in interface IdentityType
Parameters:
name - of attribute
Returns:
attribute values or null if attribute with given name doesn't exist

getAttributes

public Map<String,String[]> getAttributes()
Specified by:
getAttributes in interface IdentityType
Returns:
map of attribute names and their values


Copyright © 2012. All Rights Reserved.