public class FileBasedKieServerTemplateStorage extends Object implements KieServerTemplateStorage
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SERVER_TEMPLATE_FILENAME |
static String |
SERVER_TEMPLATE_FILE_NAME_PROP |
static String |
STORAGE_FILE_WATCHER_ENABLED |
| Modifier | Constructor and Description |
|---|---|
protected |
FileBasedKieServerTemplateStorage()
Default constructor
|
protected |
FileBasedKieServerTemplateStorage(String templatesLocation)
Constructor that takes a template location argument
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearTemplateMaps() |
void |
close() |
ServerTemplate |
delete(String identifier) |
boolean |
exists(String identifier) |
static FileBasedKieServerTemplateStorage |
getInstance() |
static FileBasedKieServerTemplateStorage |
getInstance(String templatesLocation) |
ServerTemplateKey |
getTemplateKey(String id)
Returns the ServerTemplateKey object associated with a server template's id
|
String |
getTemplatesLocation() |
protected void |
init(String templatesLocation)
Initializes the class instance
|
List<ServerTemplate> |
load() |
ServerTemplate |
load(String identifier) |
List<ServerTemplateKey> |
loadKeys() |
void |
loadTemplateMapsFromFile()
Loads the map of server templates from the file pointed at by the templatesLocation
|
void |
setTemplatesLocation(String templatesLocation) |
ServerTemplate |
store(ServerTemplate serverTemplate) |
String |
toString() |
ServerTemplate |
update(ServerTemplate serverTemplate) |
public static final String STORAGE_FILE_WATCHER_ENABLED
public static final String SERVER_TEMPLATE_FILE_NAME_PROP
public static final String DEFAULT_SERVER_TEMPLATE_FILENAME
protected FileBasedKieServerTemplateStorage()
protected FileBasedKieServerTemplateStorage(String templatesLocation)
templatesLocation - A string value that indicates where the server templates should be stored. A null value
indicates that the value should be retrieved from the system properties.public static FileBasedKieServerTemplateStorage getInstance()
public static FileBasedKieServerTemplateStorage getInstance(String templatesLocation)
protected void init(String templatesLocation)
templatesLocation - A string value that indicates where the server templates should be stored. A null value
indicates that the value should be retrieved from the system properties.public void loadTemplateMapsFromFile()
public ServerTemplate store(ServerTemplate serverTemplate)
store in interface KieServerTemplateStoragepublic List<ServerTemplateKey> loadKeys()
loadKeys in interface KieServerTemplateStoragepublic ServerTemplateKey getTemplateKey(String id)
id - The server template id that points to the ServerTemplateKeypublic List<ServerTemplate> load()
load in interface KieServerTemplateStoragepublic ServerTemplate load(String identifier)
load in interface KieServerTemplateStoragepublic boolean exists(String identifier)
exists in interface KieServerTemplateStoragepublic ServerTemplate update(ServerTemplate serverTemplate)
update in interface KieServerTemplateStoragepublic ServerTemplate delete(String identifier)
delete in interface KieServerTemplateStoragepublic void clearTemplateMaps()
public void setTemplatesLocation(String templatesLocation)
public String getTemplatesLocation()
public void close()
close in interface KieServerTemplateStorageCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.