Package org.javlo.service
Class DataToIDService
- java.lang.Object
-
- org.javlo.service.DataToIDService
-
public class DataToIDService extends Object
-
-
Constructor Summary
Constructors Constructor Description DataToIDService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearData(String data)
remove a value from properties.void
clearTimeData()
String
getData(String id)
static DataToIDService
getInstance(File propertiesFile)
static DataToIDService
getInstance(javax.servlet.ServletContext application)
ConfigurationProperties
getProperties()
static void
main(String[] args)
String
setData(String data)
create a data with id to access it.String
setData(String data, long liveTime)
set a data not for infinity time
-
-
-
Method Detail
-
getInstance
public static DataToIDService getInstance(javax.servlet.ServletContext application)
-
getInstance
public static DataToIDService getInstance(File propertiesFile)
-
getProperties
public ConfigurationProperties getProperties()
-
setData
public String setData(String data)
create a data with id to access it.- Parameters:
data
- a free data- Returns:
- a random id to access to data.
-
clearTimeData
public void clearTimeData()
-
setData
public String setData(String data, long liveTime)
set a data not for infinity time- Parameters:
data
- a dataliveTime
- in ms after this time the data is obsolete- Returns:
-
main
public static void main(String[] args)
-
clearData
public void clearData(String data)
remove a value from properties.- Parameters:
data
-
-
-