edu.internet2.middleware.grouper.ui.util
Class ObjectAsMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by edu.internet2.middleware.grouper.ui.util.ObjectAsMap
All Implemented Interfaces:
Serializable, Cloneable, Map
Direct Known Subclasses:
AuditEntryAsMap, CompositeAsMap, FieldAsMap, GroupAsMap, MembershipAsMap, StemAsMap, SubjectAsMap, SubjectPrivilegeAsMap

public class ObjectAsMap
extends HashMap

Base class for using a Map as a wrapper to an object

Version:
$Id: ObjectAsMap.java,v 1.10 2009-10-16 12:16:32 isgwb Exp $
Author:
Gary Brown.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
ObjectAsMap()
           
ObjectAsMap(Object obj, String type)
           
 
Method Summary
 Set entrySet()
           
 Object get(Object key)
           
 String getDateFormat()
           
static ObjectAsMap getInstance(String type, Object object)
          Rather than use a constructor directly, the UI reads the implementation type from media.properties.
static ObjectAsMap getInstance(String type, Object object, GrouperSession grouperSession)
          Rather than use a constructor directly, the UI reads the implementation type from media.properties.
static ObjectAsMap getInstance(String type, Object object, ResourceBundle bundle)
          Rather than use a constructor directly, the UI reads the implementation type from media.properties.
static ObjectAsMap getInstance(String type, Subject object)
          Rather than use a constructor directly, the UI reads the implementation type from media.properties.
static ObjectAsMap getInstance(String type, Subject subject, GrouperSession grouperSession, GroupOrStem groupOrStem, String privilege)
          Rather than use a constructor directly, the UI reads the implementation type from media.properties.
 String getObjectType()
           
 String getString(String key)
           
 Object getWrappedObject()
           
 boolean isEmpty()
           
 Set keySet()
           
 void setDateFormat(String dateFormat)
           
 int size()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, put, putAll, remove, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ObjectAsMap

public ObjectAsMap()

ObjectAsMap

public ObjectAsMap(Object obj,
                   String type)
Method Detail

getObjectType

public String getObjectType()
Returns:
notional type of object

getWrappedObject

public Object getWrappedObject()
Returns:
object that was wrapped

getString

public String getString(String key)
Parameters:
key - to get
Returns:
value assumed to be String

get

public Object get(Object key)
Specified by:
get in interface Map
Overrides:
get in class HashMap

getInstance

public static ObjectAsMap getInstance(String type,
                                      Object object,
                                      GrouperSession grouperSession)
Rather than use a constructor directly, the UI reads the implementation type from media.properties. This allows sites to provide alternative implementations

Parameters:
type -
object -
grouperSession -
Returns:
subclass as configured in media.properties

getInstance

public static ObjectAsMap getInstance(String type,
                                      Subject subject,
                                      GrouperSession grouperSession,
                                      GroupOrStem groupOrStem,
                                      String privilege)
Rather than use a constructor directly, the UI reads the implementation type from media.properties. This allows sites to provide alternative implementations

Parameters:
type -
subject -
grouperSession -
groupOrStem -
privilege -
Returns:
subclass as configured in media.properties

getInstance

public static ObjectAsMap getInstance(String type,
                                      Object object,
                                      ResourceBundle bundle)
Rather than use a constructor directly, the UI reads the implementation type from media.properties. This allows sites to provide alternative implementations

Parameters:
type -
object -
bundle -
Returns:
subclass as configured in media.properties

getInstance

public static ObjectAsMap getInstance(String type,
                                      Object object)
Rather than use a constructor directly, the UI reads the implementation type from media.properties. This allows sites to provide alternative implementations

Parameters:
type -
object -
Returns:
subclass as configured in media.properties

getInstance

public static ObjectAsMap getInstance(String type,
                                      Subject object)
Rather than use a constructor directly, the UI reads the implementation type from media.properties. This allows sites to provide alternative implementations

Parameters:
type -
object -
Returns:
subclass as configured in media.properties

keySet

public Set keySet()
Specified by:
keySet in interface Map
Overrides:
keySet in class HashMap

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
Overrides:
isEmpty in class HashMap

size

public int size()
Specified by:
size in interface Map
Overrides:
size in class HashMap

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
Overrides:
entrySet in class HashMap

getDateFormat

public String getDateFormat()

setDateFormat

public void setDateFormat(String dateFormat)