|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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(String property)
Crowd only supports email and fullname properties currently, so these are the only ones we check |
protected Object |
get(int type,
String key)
Return's a value for the given type and key, if it exists(). |
Collection |
getKeys(String prefix,
int type)
List all keys starting with supplied prefix of certain type. |
String |
getString(String property)
This has been overriden to provide specific support for email |
int |
getType(String key)
Returns type of value. |
void |
init(Map config,
Map args)
Initialises the Property Set, specifically the keys and principal |
boolean |
isSettable(String property)
|
void |
remove(String key)
Removes a property if it is supported ( isSettable() ) and exists() |
protected void |
removeAttribute(SOAPPrincipal user,
String key)
Removes the given attribute from the user. |
protected void |
setImpl(int type,
String key,
Object value)
Allows the setting of properties, if they are 'settable', ie isSettable(). |
void |
setKeys(Map keys)
|
void |
setPrincipal(SOAPPrincipal principal)
|
void |
setString(String property,
String value)
CWD-1190 - Replace an existing property rather than appending. |
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 Collection getKeys(String prefix, int type) throws com.opensymphony.module.propertyset.PropertyException
getKeys
in interface com.opensymphony.module.propertyset.PropertySet
getKeys
in class com.opensymphony.module.propertyset.AbstractPropertySet
prefix
- 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
String
s.
com.opensymphony.module.propertyset.PropertyException
public int getType(String key) throws com.opensymphony.module.propertyset.PropertyException
getType
in interface com.opensymphony.module.propertyset.PropertySet
getType
in class com.opensymphony.module.propertyset.AbstractPropertySet
com.opensymphony.module.propertyset.PropertyException
public void remove(String key) throws com.opensymphony.module.propertyset.PropertyException
isSettable()
) and exists()
remove
in interface com.opensymphony.module.propertyset.PropertySet
remove
in class com.opensymphony.module.propertyset.AbstractPropertySet
com.opensymphony.module.propertyset.PropertyException
protected void removeAttribute(SOAPPrincipal user, String key)
user
- key
- public boolean exists(String property) throws com.opensymphony.module.propertyset.PropertyException
exists
in interface com.opensymphony.module.propertyset.PropertySet
exists
in class com.opensymphony.module.propertyset.AbstractPropertySet
property
-
com.opensymphony.module.propertyset.PropertyException
protected void setImpl(int type, String key, Object value) throws com.opensymphony.module.propertyset.PropertyException
setImpl
in class com.opensymphony.module.propertyset.AbstractPropertySet
type
- 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 Object get(int type, String key) throws com.opensymphony.module.propertyset.PropertyException
get
in class com.opensymphony.module.propertyset.AbstractPropertySet
type
- the type of Object you are looking for, eg STRINGkey
- the key of the value
com.opensymphony.module.propertyset.PropertyException
public void init(Map config, Map args)
init
in interface com.opensymphony.module.propertyset.PropertySet
init
in class com.opensymphony.module.propertyset.AbstractPropertySet
config
- args
- public boolean isSettable(String property)
isSettable
in interface com.opensymphony.module.propertyset.PropertySet
isSettable
in class com.opensymphony.module.propertyset.AbstractPropertySet
public void setString(String property, String value) throws com.opensymphony.module.propertyset.PropertyException
setString
in interface com.opensymphony.module.propertyset.PropertySet
setString
in class com.opensymphony.module.propertyset.AbstractPropertySet
property
- value
-
com.opensymphony.module.propertyset.PropertyException
public String getString(String property) throws com.opensymphony.module.propertyset.PropertyException
getString
in interface com.opensymphony.module.propertyset.PropertySet
getString
in class com.opensymphony.module.propertyset.AbstractPropertySet
property
-
com.opensymphony.module.propertyset.PropertyException
public boolean supportsType(int type)
supportsType
in interface com.opensymphony.module.propertyset.PropertySet
supportsType
in class com.opensymphony.module.propertyset.AbstractPropertySet
public void setKeys(Map keys)
public void setPrincipal(SOAPPrincipal principal)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |