org.chorem.jtimer
Class JTimerFactory

java.lang.Object
  extended by org.chorem.jtimer.JTimerFactory

public class JTimerFactory
extends Object

JTimer config class.

Version:
$Revision: 2518 $ Last update : $Date: 2009-05-22 13:17:51 +0200 (ven. 22 mai 2009) $ By : $Author: chatellier $
Author:
chatellier

Field Summary
protected static long DEFAULT_IDLE_TIME
          Default idle time in milliseconds
protected static long idleTime
          Configured idle time
protected static ProjectManagement projectManagement
          ProjectManagement
protected static Properties props
          Properties
protected static Saver saver
          Saver
 
Constructor Summary
protected JTimerFactory()
          Constructeur.
 
Method Summary
protected static void copyConfigurationFile(URL copyFrom, File copyTo)
          Copy copyFrom content in copyTo file.
protected static String getConfigurationFileName()
          Configuration filename.
protected static String getDefaultConfigurationFileName()
          Default configuration filename.
static Saver getFileSaver()
          Get saver manager.
protected static String getHomeReplacement(String path)
          Replace $HOME in path.
static long getIdleTime()
          Get configuration idle time in ms.
static ProjectManagement getProjectManagementService()
          Return an implementation on a distant web service.
protected static String getUserHomeConfigurationFilePath()
          Configuration filepath.
protected static void init()
          Init.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IDLE_TIME

protected static final long DEFAULT_IDLE_TIME
Default idle time in milliseconds

See Also:
Constant Field Values

props

protected static Properties props
Properties


idleTime

protected static long idleTime
Configured idle time


projectManagement

protected static ProjectManagement projectManagement
ProjectManagement


saver

protected static Saver saver
Saver

Constructor Detail

JTimerFactory

protected JTimerFactory()
Constructeur.

Method Detail

init

protected static void init()
Init.


getUserHomeConfigurationFilePath

protected static String getUserHomeConfigurationFilePath()
Configuration filepath.

Returns:
Configuration filename

getConfigurationFileName

protected static String getConfigurationFileName()
Configuration filename.

Returns:
Configuration filename

getDefaultConfigurationFileName

protected static String getDefaultConfigurationFileName()
Default configuration filename.

Returns:
Configuration filename

copyConfigurationFile

protected static void copyConfigurationFile(URL copyFrom,
                                            File copyTo)
                                     throws IOException
Copy copyFrom content in copyTo file.

Parameters:
copyFrom - from
copyTo - to
Throws:
IOException

getProjectManagementService

public static ProjectManagement getProjectManagementService()
Return an implementation on a distant web service. Use jtimer.service.class property to found class and jtimer.service.endpoint and jtimer.service.resource to init it.

Returns:
implementation on a distant web service.

getFileSaver

public static Saver getFileSaver()
Get saver manager.

Returns:
saver manager

getHomeReplacement

protected static String getHomeReplacement(String path)
Replace $HOME in path.

Parameters:
path - path to replace home
Returns:
path without $HOME

getIdleTime

public static long getIdleTime()
Get configuration idle time in ms.

Returns:
idle time


Copyright © 2007-2009 CodeLutin. All Rights Reserved.