|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.ArtifactCacheManager
public final class ArtifactCacheManager
A collection of ArtifactCache's managed for a given server. The framework owns these caches and the associated baselines, so that all web client applications (if loaded in the same JRE) will be able to access each others cache and share types across caches The managed caches comprise tip and baselines, i.e. rolled back configurations (identified by Context) The Tip Artifact caches all interesting projects, views and types (as determined by the caller) In contrast, each rolled back cache contains all the types for a single rolled back view
| Nested Class Summary | |
|---|---|
static class |
ArtifactCacheManager.Client
Establish the context of a Client Application. |
static class |
ArtifactCacheManager.Context
Establish the context in which a web application will execute some session specific requirement. |
static interface |
ArtifactCacheManager.Securable
An object that can be secured in the repository. |
static interface |
ArtifactCacheManager.SecurableContainer
A container in the repository that can hold secured objects of a given type. |
| Method Summary | |
|---|---|
boolean |
canAccessContainerForReading(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s)
returns true if this securable's container is accessible for reading by the specified Principal |
boolean |
canAccessForReading(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s)
returns true if this securable's container is accessible for reading by the specified Principal |
boolean |
canCreateArtifactType(Principal.WebCachePrincipal principal,
ArtifactCacheManager.SecurableContainer sc,
Type.WebCacheType t)
help method wrapping hasContainerRights specifically for GENERIC_CREATE_NEW_OBJECT |
boolean |
canCreateProject(User.WebCacheUser u)
User must be logged in through JobRunner.logon. |
void |
dropCache(ArtifactCacheManager.Context ctxt)
Drop a tip or historical cache configuration In a multi-tenant hosted model, there may be several tip caches, one per tenant |
static ArtifactCacheManager[] |
getAllArtifactCacheManagers()
returns the set of all artifact cache managers registered in this cache |
ArtifactCache[] |
getAllHistoricalCaches()
returns the set of all historical Artifact Caches managed by this ArtifactCacheManager manager |
ArtifactCacheManager.Client[] |
getAllRegisteredClients()
return the set of all registered clients |
static java.util.Hashtable |
getApplicationStore()
return a Hashtable that Hub clients may use to communicate across threads, across sessions, across processes – as long as they share the same VM (Runtime) The contents of this hashtable are irrelevant to the Baseline Manager |
ArtifactCache |
getCache(ArtifactCacheManager.Context ctxt)
return the tip artifact cache for a specific tenant or the ArtifactCache used to house a historical (rolled back) configuration Note that the tenant is identified by the Administrative Context, i.e. |
ArtifactCacheManager.Client |
getClient(java.lang.String applicationName)
Return the Client described by the specified Application Name or null if there is no client registered matching this application name Applications may choose to maintain their own Client Context, or allow the ArtifactCacheManager to maintain the Client context on their behalf |
java.lang.String |
getGUID()
Returns the GUID for this ArtifactCacheManager |
DateTime |
getLastUsedAt(User.WebCacheUser usr)
Returns the time at which the specified user last used the cache |
static ArtifactCacheManager |
getManager(java.lang.String guid)
returns an artifact cache manager responsible for managing the caches for a server or NULL |
boolean |
hasCache(ArtifactCacheManager.Context ctxt)
returns true if this manager houses a historical cache described by the specified context |
boolean |
hasContainerRight(Principal.WebCachePrincipal principal,
ArtifactCacheManager.SecurableContainer sc,
Type.WebCacheType t,
Permission p)
true if this securable container has the selected rights for the specified Principal and specified Type |
boolean |
hasContainerRight(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
Permission p)
true if this securable's container has the selected right for the specified Principal |
boolean |
hasContainerRights(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
PermissionCollection pc)
true if this securable's container has the selected rights for the specified Principal |
boolean |
hasRight(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
Permission p)
returns true if this securable has the selected right for the specified Principal |
boolean |
hasRights(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
PermissionCollection pc)
returns true if this securable has the selected rights for the specified Principal |
static ArtifactCacheManager.Context |
register(ServerInfo si)
create an artifact cache manager with the given connectivity and credentials |
ArtifactCacheManager.Client |
registerClient(java.lang.String appName)
Register a Client for this ArtifactCacheManager. |
void |
resetRefreshPeriod(int refreshPeriod)
Reset the refresh period for the artifact cache managers. |
static void |
unregister(java.lang.String guid)
remove an artifact cache manager from the cache |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ArtifactCacheManager.Client getClient(java.lang.String applicationName)
applicationName - the application name
public ArtifactCacheManager.Client[] getAllRegisteredClients()
public ArtifactCacheManager.Client registerClient(java.lang.String appName)
appName - the client to registerpublic DateTime getLastUsedAt(User.WebCacheUser usr)
usr - the user to test
public boolean canCreateProject(User.WebCacheUser u)
u - The Logged on user to be tested for create project permission
(SERVER_CREATE_PROJECT)
public static java.util.Hashtable getApplicationStore()
public void resetRefreshPeriod(int refreshPeriod)
refreshPeriod - the new refresh periodpublic static ArtifactCacheManager.Context register(ServerInfo si)
si - the ServerInfo to register
public static ArtifactCacheManager getManager(java.lang.String guid)
guid - the GUID describing the repository (server)
Server.getRepositoryID()public static void unregister(java.lang.String guid)
guid - the GUID describing the repository (server)public static ArtifactCacheManager[] getAllArtifactCacheManagers()
public java.lang.String getGUID()
public boolean hasCache(ArtifactCacheManager.Context ctxt)
ctxt - the context that specifies a historical cache
public ArtifactCache getCache(ArtifactCacheManager.Context ctxt)
ctxt - the context that identifies the ArtifactCache. It may be the tip or rolled back
public ArtifactCache[] getAllHistoricalCaches()
public boolean canAccessForReading(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s)
principal - the principal in whose context the test is being mades - the securable whose container object (artifact) is being
tested
public boolean canAccessContainerForReading(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s)
principal - the principal in whose context the test is being mades - the securable whose container object (artifact) is being
tested
public boolean hasRight(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
Permission p)
principal - the principal whose right is being checkeds - the securable object (artifact) being testedp - the permission (access right) in question
public boolean hasRights(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
PermissionCollection pc)
principal - the principal whose rights are being checkeds - the securable object (artifact) being testedpc - the permissions (access rights) in question
public boolean hasContainerRight(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
Permission p)
principal - the principal whose rights are being checkeds - the securable whose container object (artifact) is being
testedp - the permission (access right) in question
public boolean hasContainerRights(Principal.WebCachePrincipal principal,
ArtifactCacheManager.Securable s,
PermissionCollection pc)
principal - the principal whose rights are being checkeds - the securable whose container object (artifact) is being
testedpc - the permissions (access rights) in question
public boolean hasContainerRight(Principal.WebCachePrincipal principal,
ArtifactCacheManager.SecurableContainer sc,
Type.WebCacheType t,
Permission p)
principal - the principal whose rights are being checkedsc - the securable container being testedt - the type to check permissions for in the securable containerp - the permission (access right) in question
public boolean canCreateArtifactType(Principal.WebCachePrincipal principal,
ArtifactCacheManager.SecurableContainer sc,
Type.WebCacheType t)
principal - the principal whose rights are being checkedsc - the securable container being testedt - the type to check create permissions for
public void dropCache(ArtifactCacheManager.Context ctxt)
ctxt - The context specifying a historical configuration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||