ome.services.util
Class DropBoxDirectoryCheck

java.lang.Object
  extended by ome.services.util.DropBoxDirectoryCheck
All Implemented Interfaces:
Runnable, EventListener, org.springframework.context.ApplicationListener

public class DropBoxDirectoryCheck
extends Object
implements org.springframework.context.ApplicationListener, Runnable

Hook run by the context at startup to create a drop-box directory per user. Also listens for UserGroupUpdateEvent messages and creates a new directory if necessary.

Since:
4.0.0
Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
static org.apache.commons.logging.Log log
           
 
Constructor Summary
DropBoxDirectoryCheck(String omeroDataDir, org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc)
           
 
Method Summary
 int createUserDirectories(Set<String> users)
           
 Set<String> getCurrentUserNames()
           
 void onApplicationEvent(org.springframework.context.ApplicationEvent arg0)
           
 void run()
          Synchronizes the ${omero.data.dir}/DropBox directory by creating a directory for any user who does not have one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.commons.logging.Log log
Constructor Detail

DropBoxDirectoryCheck

public DropBoxDirectoryCheck(String omeroDataDir,
                             org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc)
Method Detail

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent arg0)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener

run

public void run()
Synchronizes the ${omero.data.dir}/DropBox directory by creating a directory for any user who does not have one. Does not currently remove directories.

Specified by:
run in interface Runnable

getCurrentUserNames

public Set<String> getCurrentUserNames()

createUserDirectories

public int createUserDirectories(Set<String> users)


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

Copyright © 2009 The University of Dundee. All Rights Reserved.