com.atlassian.confluence.security
Class DownloadGateKeeper

java.lang.Object
  extended by com.atlassian.confluence.security.DownloadGateKeeper
All Implemented Interfaces:
GateKeeper

public class DownloadGateKeeper
extends Object
implements GateKeeper


Field Summary
static long ONE_DAY
           
static Map permittedDownloads
           
 
Constructor Summary
DownloadGateKeeper()
           
 
Method Summary
 void addKey(String path, User user)
          Forms a key from the user + path combo.
 void allowAnonymousAccess(String path)
           
 void cleanAllKeys()
          To be called when the temp dir is cleaned out.
 boolean isAccessPermitted(String path, User user)
           
 void setBootstrapManager(BootstrapManager bootstrapManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

permittedDownloads

public static final Map permittedDownloads

ONE_DAY

public static final long ONE_DAY
See Also:
Constant Field Values
Constructor Detail

DownloadGateKeeper

public DownloadGateKeeper()
Method Detail

addKey

public void addKey(String path,
                   User user)
Forms a key from the user + path combo. and stores it as a permission to the path

Specified by:
addKey in interface GateKeeper
Parameters:
user -
path -

allowAnonymousAccess

public void allowAnonymousAccess(String path)
Specified by:
allowAnonymousAccess in interface GateKeeper

isAccessPermitted

public boolean isAccessPermitted(String path,
                                 User user)
Specified by:
isAccessPermitted in interface GateKeeper
Parameters:
path -
user -
Returns:
true if a key matches the path and user combination (if the user is permitted to download the file in the tmp dir).

cleanAllKeys

public void cleanAllKeys()
To be called when the temp dir is cleaned out. Removes all permissions stored as keys.

Specified by:
cleanAllKeys in interface GateKeeper

setBootstrapManager

public void setBootstrapManager(BootstrapManager bootstrapManager)


Confluence is developed by Atlassian.