com.atlassian.jira.user.osuser
Class JiraOFBizAbstractProvider
java.lang.Object
com.atlassian.jira.user.osuser.JiraOFBizAbstractProvider
- All Implemented Interfaces:
- com.opensymphony.user.provider.UserProvider, java.io.Serializable
- Direct Known Subclasses:
- JiraOFBizProfileProvider
public abstract class JiraOFBizAbstractProvider
- extends java.lang.Object
- implements com.opensymphony.user.provider.UserProvider
A copy of OSUser's OFBizAbstractProvider, with some performance tweaks.
An abstract provider which handles most of the init and life cycle tasks of the provider.
Here's a sample of the entitymodel.xml fragment required for the OFBiz OSUser providers:
<!-- OSUser implementation -->
<entity entity-name="OSUser" table-name="userBase">
<field name="id" type="numeric"/>
<field name="name" type="string"/>
<field name="passwordHash" type="string"/>
<prim-key field="id"/>
</entity>
<entity entity-name="OSMembership" table-name="membershipBase">
<field name="id" type="numeric"/>
<field name="userName" type="string"/>
<field name="groupName" type="string"/>
<prim-key field="id"/>
</entity>
<entity entity-name="OSGroup" table-name="groupBase">
<field name="id" type="numeric"/>
<field name="name" type="string"/>
<prim-key field="id"/>
</entity>
Settable properties (these must be set in all providers if changed from the default!):
delegator - the name of the OFBiz delegator (default: "default")
userEntity - the name of the OFBiz group entity (default: "OSUser")
exclusiveAccess - Whether or not the provider has exclusive access to the database
(ie can take advantage of in memory caches) (default: "false")
- Since:
- v4.0
- Author:
- Victor Salaman, Mike Cannon-Brookes
- See Also:
- Serialized Form
Method Summary |
protected void |
clearAllCache()
If using exclusive access, this will clear the cache of all users |
protected void |
clearUserCache(java.lang.String name)
If using exclusive access, this will clear the cache of a particular user |
boolean |
create(java.lang.String s)
|
protected org.ofbiz.core.entity.GenericValue |
findUser(java.lang.String name)
|
void |
flushCaches()
|
protected org.ofbiz.core.entity.GenericDelegator |
getDelegator()
|
boolean |
init(java.util.Properties properties)
|
java.util.List<java.lang.String> |
list()
|
boolean |
load(java.lang.String s,
com.opensymphony.user.Entity.Accessor accessor)
|
boolean |
remove(java.lang.String s)
|
boolean |
store(java.lang.String s,
com.opensymphony.user.Entity.Accessor accessor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.opensymphony.user.provider.UserProvider |
handles |
nameCache
protected CacheMap<java.lang.String,org.ofbiz.core.entity.GenericValue> nameCache
delegator
protected java.lang.String delegator
userEntity
protected java.lang.String userEntity
exclusiveAccess
protected volatile boolean exclusiveAccess
JiraOFBizAbstractProvider
public JiraOFBizAbstractProvider()
create
public boolean create(java.lang.String s)
- Specified by:
create
in interface com.opensymphony.user.provider.UserProvider
flushCaches
public void flushCaches()
- Specified by:
flushCaches
in interface com.opensymphony.user.provider.UserProvider
init
public boolean init(java.util.Properties properties)
- Specified by:
init
in interface com.opensymphony.user.provider.UserProvider
list
public java.util.List<java.lang.String> list()
- Specified by:
list
in interface com.opensymphony.user.provider.UserProvider
load
public boolean load(java.lang.String s,
com.opensymphony.user.Entity.Accessor accessor)
- Specified by:
load
in interface com.opensymphony.user.provider.UserProvider
remove
public boolean remove(java.lang.String s)
- Specified by:
remove
in interface com.opensymphony.user.provider.UserProvider
store
public boolean store(java.lang.String s,
com.opensymphony.user.Entity.Accessor accessor)
- Specified by:
store
in interface com.opensymphony.user.provider.UserProvider
getDelegator
protected org.ofbiz.core.entity.GenericDelegator getDelegator()
clearAllCache
protected void clearAllCache()
- If using exclusive access, this will clear the cache of all users
clearUserCache
protected void clearUserCache(java.lang.String name)
- If using exclusive access, this will clear the cache of a particular user
- Parameters:
name
- username
findUser
protected org.ofbiz.core.entity.GenericValue findUser(java.lang.String name)
throws org.ofbiz.core.entity.GenericEntityException
- Throws:
org.ofbiz.core.entity.GenericEntityException
Copyright © 2002-2011 Atlassian. All Rights Reserved.