|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.crowd.integration.atlassianuser.CacheManagerAtlassianUser
public class CacheManagerAtlassianUser
The CacheManagerAtlassianUser
is a central class for increasing the performance of the JIRA, Confluence
and Bamboo integration with Crowd. The cache is used to store information that become redundant calls between
request because security information does not change that often. The enabling and length of time the cache has is
determined through the Crowd administrationc console.
Field Summary | |
---|---|
protected static String |
GROUP_KEY
|
protected static String |
GROUPNAMES_KEY
|
protected static String |
PRINCIPAL_KEY
|
protected static String |
PRINCIPALMEMBERSHIPS_KEY
|
protected static String |
PRINCIPALNAMES_KEY
|
protected static Boolean |
serverCacheCheck
|
Constructor Summary | |
---|---|
CacheManagerAtlassianUser()
Default constructor. |
Method Summary | |
---|---|
void |
cacheGroup(SOAPGroup group)
Caches a specific group. |
void |
cacheGroupNames(List principalNames)
Gets a list of all known group names. |
void |
cacheGroups(SOAPGroup[] groups)
Caches all of the groups. |
void |
cachePrincipal(SOAPPrincipal principal)
caches a specific principal. |
void |
cachePrincipalMemberships(String username,
List membership)
Caches the group memberships of a principal. |
void |
cachePrincipalNames(List principalNames)
Caches all of the principal names. |
void |
cachePrincipals(SOAPPrincipal[] principals)
Caches all of the principals. |
void |
flushCaches()
Flushes all of the cache information. |
int |
getCacheSeconds()
Gets the cache TTL in seconds. |
protected Cache |
getDefaultCache()
Gets the cache for the integration application. |
protected Object |
getFromCache(String key)
Gets a specific item from the application cache. |
SOAPGroup |
getGroup(String name)
Gets a specific group by the name from the cache. |
List |
getGroupNames()
Gets a list of all known group names. |
List |
getGroups()
Gets a list of all known groups. |
SOAPPrincipal |
getPrincipal(String name)
Gets a specific principal by the name from the cache. |
List |
getPrincipalMemberships(String username)
Gets the memberships of a principal. |
List |
getPrincipalNames()
Gets a list of all known principal names. |
List |
getPrincipals()
Gets a list of all known principals. |
boolean |
isCacheEnabled()
Returns if caching is enabled. |
protected void |
putInCache(String key,
Object object)
Attemps to put a specific item into the application cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String PRINCIPAL_KEY
protected static final String PRINCIPALMEMBERSHIPS_KEY
protected static final String GROUP_KEY
protected static final String PRINCIPALNAMES_KEY
protected static final String GROUPNAMES_KEY
protected static Boolean serverCacheCheck
Constructor Detail |
---|
public CacheManagerAtlassianUser()
Method Detail |
---|
public boolean isCacheEnabled()
true
if and only if the caching is enabled, otherwise false
.public int getCacheSeconds()
protected Cache getDefaultCache()
protected Object getFromCache(String key) throws CacheException
key
- The object key in the cache.
CacheException
- If the object could not be found, this exception will be thrown.protected void putInCache(String key, Object object)
key
- The object key to use when caching to the object.object
- The object to cache.public void cachePrincipals(SOAPPrincipal[] principals)
principals
- The principals to cache.public SOAPPrincipal getPrincipal(String name) throws CacheException
name
from the cache.
name
- The name of the principal.
CacheException
- If the object could not be found, this exception will be thrown.public void cacheGroups(SOAPGroup[] groups)
groups
- The groups to cache.public void cacheGroup(SOAPGroup group)
group
- The group to cache.public List getGroups() throws CacheException
CacheException
- If the object could not be found, this exception will be thrown.public SOAPGroup getGroup(String name) throws CacheException
name
from the cache.
name
- The name of the group
CacheException
- If the object could not be found, this exception will be thrown.public void cachePrincipal(SOAPPrincipal principal)
principal
- The principal to cache.public List getPrincipals() throws CacheException
CacheException
- If the object could not be found, this exception will be thrown.public List getPrincipalNames() throws CacheException
CacheException
- If the object could not be found, this exception will be thrown.public void cachePrincipalNames(List principalNames)
principalNames
- The principal names as public void cacheGroupNames(List principalNames)
CacheException
- If the object could not be found, this exception will be thrown.public List getGroupNames() throws CacheException
CacheException
- If the object could not be found, this exception will be thrown.public List getPrincipalMemberships(String username) throws CacheException
username
- The username.
CacheException
public void cachePrincipalMemberships(String username, List membership)
username
- The name of the principal.membership
- A list of public void flushCaches()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |