com.atlassian.jira.user.osuser
Class JiraOFBizAbstractProvider
java.lang.Object
com.atlassian.jira.user.osuser.JiraOFBizAbstractProvider
- All Implemented Interfaces:
- UserProvider, Serializable
- Direct Known Subclasses:
- JiraOFBizProfileProvider
public abstract class JiraOFBizAbstractProvider
- extends Object
- implements 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected final org.apache.log4j.Logger LOG
nameCache
protected CacheMap<String,org.ofbiz.core.entity.GenericValue> nameCache
delegator
protected String delegator
userEntity
protected String userEntity
exclusiveAccess
protected volatile boolean exclusiveAccess
JiraOFBizAbstractProvider
public JiraOFBizAbstractProvider()
create
public boolean create(String s)
- Specified by:
create
in interface UserProvider
flushCaches
public void flushCaches()
- Specified by:
flushCaches
in interface UserProvider
init
public boolean init(Properties properties)
- Specified by:
init
in interface UserProvider
list
public List<String> list()
- Specified by:
list
in interface UserProvider
load
public boolean load(String s,
Entity.Accessor accessor)
- Specified by:
load
in interface UserProvider
remove
public boolean remove(String s)
- Specified by:
remove
in interface UserProvider
store
public boolean store(String s,
Entity.Accessor accessor)
- Specified by:
store
in interface 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(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(String name)
throws org.ofbiz.core.entity.GenericEntityException
- Throws:
org.ofbiz.core.entity.GenericEntityException
Copyright © 2002-2009 Atlassian. All Rights Reserved.