|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.module.propertyset.AbstractPropertySet
com.atlassian.crowd.integration.osuser.CrowdPropertySet
public class CrowdPropertySet
This class manages the translation of user information between Crowd and JIRA. It will directly access the Crowd UserManager to fetch or update user details.
As of the time of writing, this class only supports email and displayname - other attributes are ignored.
| Field Summary |
|---|
| Fields inherited from class com.opensymphony.module.propertyset.AbstractPropertySet |
|---|
schema |
| Fields inherited from interface com.opensymphony.module.propertyset.PropertySet |
|---|
BOOLEAN, DATA, DATE, DOUBLE, INT, LONG, OBJECT, PROPERTIES, STRING, TEXT, XML |
| Constructor Summary | |
|---|---|
CrowdPropertySet()
|
|
CrowdPropertySet(UserManager userManager)
|
|
| Method Summary | |
|---|---|
boolean |
exists(java.lang.String property)
Crowd only supports email and fullname properties currently, so these are the only ones we check |
protected java.lang.Object |
get(int type,
java.lang.String key)
Return's a value for the given type and key, if it exists(). |
java.util.Collection |
getKeys(java.lang.String prefix,
int type)
List all keys starting with supplied prefix of certain type. |
java.lang.String |
getString(java.lang.String property)
This has been overriden to provide specific support for email |
int |
getType(java.lang.String key)
Returns type of value. |
void |
init(java.util.Map config,
java.util.Map args)
Initialises the Property Set, specifically the keys and principal |
boolean |
isSettable(java.lang.String property)
|
void |
remove(java.lang.String key)
Removes a property if it is supported ( isSettable()) and exists() |
protected void |
removeAttribute(SOAPPrincipal user,
java.lang.String key)
Removes the given attribute from the user. |
protected void |
setImpl(int type,
java.lang.String key,
java.lang.Object value)
Allows the setting of properties, if they are 'settable', ie isSettable(). |
void |
setKeys(java.util.Map keys)
|
void |
setPrincipal(SOAPPrincipal principal)
|
void |
setString(java.lang.String property,
java.lang.String value)
CWD-1190 - Replace an existing property rather than appending. |
protected java.util.Collection |
splitFullnameIntoSOAPAttributes(java.lang.String fullname)
Returns a Collection |
boolean |
supportsType(int type)
|
| Methods inherited from class com.opensymphony.module.propertyset.AbstractPropertySet |
|---|
getAsActualType, getBoolean, getData, getDate, getDouble, getInt, getKeys, getKeys, getKeys, getLong, getObject, getProperties, getSchema, getText, getXML, setAsActualType, setBoolean, setData, setDate, setDouble, setInt, setLong, setObject, setProperties, setSchema, setText, setXML, supportsTypes, toString, type, type |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CrowdPropertySet()
public CrowdPropertySet(UserManager userManager)
| Method Detail |
|---|
public java.util.Collection getKeys(java.lang.String prefix,
int type)
throws com.opensymphony.module.propertyset.PropertyException
getKeys in interface com.opensymphony.module.propertyset.PropertySetgetKeys in class com.opensymphony.module.propertyset.AbstractPropertySetprefix - String that keys must start with. If null, than all
keys shall be returned.type - Type to list. See static class variables. If null, then
all types shall be returned.
Collection of
Strings.
com.opensymphony.module.propertyset.PropertyException
public int getType(java.lang.String key)
throws com.opensymphony.module.propertyset.PropertyException
getType in interface com.opensymphony.module.propertyset.PropertySetgetType in class com.opensymphony.module.propertyset.AbstractPropertySetcom.opensymphony.module.propertyset.PropertyException
public void remove(java.lang.String key)
throws com.opensymphony.module.propertyset.PropertyException
isSettable()) and exists()
remove in interface com.opensymphony.module.propertyset.PropertySetremove in class com.opensymphony.module.propertyset.AbstractPropertySetcom.opensymphony.module.propertyset.PropertyException
protected void removeAttribute(SOAPPrincipal user,
java.lang.String key)
user - key -
public boolean exists(java.lang.String property)
throws com.opensymphony.module.propertyset.PropertyException
exists in interface com.opensymphony.module.propertyset.PropertySetexists in class com.opensymphony.module.propertyset.AbstractPropertySetproperty -
com.opensymphony.module.propertyset.PropertyException
protected void setImpl(int type,
java.lang.String key,
java.lang.Object value)
throws com.opensymphony.module.propertyset.PropertyException
setImpl in class com.opensymphony.module.propertyset.AbstractPropertySettype - the type, eg. STRINGkey - the key for a given propertyvalue - the value of a property, which should be of the passed in type.
com.opensymphony.module.propertyset.PropertyException
protected java.lang.Object get(int type,
java.lang.String key)
throws com.opensymphony.module.propertyset.PropertyException
get in class com.opensymphony.module.propertyset.AbstractPropertySettype - the type of Object you are looking for, eg STRINGkey - the key of the value
com.opensymphony.module.propertyset.PropertyException
public void init(java.util.Map config,
java.util.Map args)
init in interface com.opensymphony.module.propertyset.PropertySetinit in class com.opensymphony.module.propertyset.AbstractPropertySetconfig - args - public boolean isSettable(java.lang.String property)
isSettable in interface com.opensymphony.module.propertyset.PropertySetisSettable in class com.opensymphony.module.propertyset.AbstractPropertySet
public void setString(java.lang.String property,
java.lang.String value)
throws com.opensymphony.module.propertyset.PropertyException
setString in interface com.opensymphony.module.propertyset.PropertySetsetString in class com.opensymphony.module.propertyset.AbstractPropertySetproperty - value -
com.opensymphony.module.propertyset.PropertyException
public java.lang.String getString(java.lang.String property)
throws com.opensymphony.module.propertyset.PropertyException
getString in interface com.opensymphony.module.propertyset.PropertySetgetString in class com.opensymphony.module.propertyset.AbstractPropertySetproperty -
com.opensymphony.module.propertyset.PropertyExceptionpublic boolean supportsType(int type)
supportsType in interface com.opensymphony.module.propertyset.PropertySetsupportsType in class com.opensymphony.module.propertyset.AbstractPropertySetprotected java.util.Collection splitFullnameIntoSOAPAttributes(java.lang.String fullname)
fullname -
public void setKeys(java.util.Map keys)
public void setPrincipal(SOAPPrincipal principal)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||