it.geosolutions.geobatch.catalog.file
Class DataDirHandler

java.lang.Object
  extended by it.geosolutions.geobatch.catalog.file.DataDirHandler
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware

public class DataDirHandler
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware

Check the configuration to find out where the data dir is located.

Author:
Etj

Field Summary
static java.lang.String GEOBATCH_DATA_DIR
           
 
Constructor Summary
DataDirHandler()
           
 
Method Summary
 java.io.File getDataDirectory()
           
 void init()
          init method called by Spring
protected  java.io.File retrieveDataDir()
          Try to retrieve the info about where the data dir is located.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GEOBATCH_DATA_DIR

public static final java.lang.String GEOBATCH_DATA_DIR
See Also:
Constant Field Values
Constructor Detail

DataDirHandler

public DataDirHandler()
Method Detail

init

public void init()
          throws java.lang.Exception
init method called by Spring

Throws:
java.lang.Exception - if could not init data dir

getDataDirectory

public java.io.File getDataDirectory()

retrieveDataDir

protected java.io.File retrieveDataDir()
                                throws java.lang.NullPointerException,
                                       java.lang.IllegalStateException
Try to retrieve the info about where the data dir is located.
On exit, the datadir var will be set, or an exception will be thrown.

Throws:
java.lang.NullPointerException
java.lang.IllegalStateException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2008-2012 GeoSolutions. All Rights Reserved.