public class RifidiEdgeHelper
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
RifidiEdgeHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addDefaultApp(java.lang.String groupName)
Add a group to the default application file.
|
static void |
addReadZone(java.lang.String groupName,
java.lang.String readZone,
javax.management.AttributeList attributes)
Add a readZone
|
static void |
deleteReadZone(java.lang.String groupName,
java.lang.String readZone)
Deletes readzone
|
static java.util.Properties |
getApplicationProperties(java.lang.String groupName,
java.lang.String appName)
Get the application properties
|
static java.util.Properties |
getGroupProperties(java.lang.String groupName)
Get the properties for application group
|
static java.util.HashMap<java.lang.String,byte[]> |
getReadzoneDataFiles(java.lang.String fileNamePrefix,
java.lang.String group)
RifidiApps can store data files in their data directory.
|
static java.util.Properties |
getReadZoneProperties(java.lang.String groupName,
java.lang.String appName,
java.lang.String readZoneName)
Get the readzone properties
|
static java.util.HashMap<java.lang.String,ReadZone> |
getReadZones(java.lang.String group)
This is a helper method that does the work of loading the read zones
|
static byte[] |
getServersFile() |
static byte[] |
getUIPropertiesFile() |
static void |
setApplicationProperties(java.lang.String groupName,
java.lang.String appName,
javax.management.AttributeList attributes)
Set application properties
|
static void |
setGroupProperties(java.lang.String groupName,
javax.management.AttributeList attributes)
Set group properties
|
static void |
setReadZoneProperties(java.lang.String groupName,
java.lang.String readZone,
javax.management.AttributeList attributes)
Set properties for an existing readzone
|
static void |
updateServersFile(java.lang.String content)
Sets the content of servers.json
|
static void |
updateUIPropertiesFile(java.lang.String content)
Sets the content of uiproperties.json
|
public static final java.util.HashMap<java.lang.String,byte[]> getReadzoneDataFiles(java.lang.String fileNamePrefix, java.lang.String group)
fileNamePrefix
- The prefix of the files to returngroup
- The name of grouppublic static java.util.HashMap<java.lang.String,ReadZone> getReadZones(java.lang.String group)
public static java.util.Properties getReadZoneProperties(java.lang.String groupName, java.lang.String appName, java.lang.String readZoneName) throws PropertiesFileNotFoundException, java.io.IOException
groupName
- the name of application groupappName
- the name of applicationreadZoneName
- the name of readzonePropertiesFileNotFoundException
- if cannot get the readzone properties filejava.io.IOException
- if cannot load the properties from filepublic static void deleteReadZone(java.lang.String groupName, java.lang.String readZone) throws java.lang.Exception
groupName
- group name of applicationreadZone
- readzone namejava.lang.Exception
- if readzone does not existpublic static java.util.Properties getApplicationProperties(java.lang.String groupName, java.lang.String appName) throws PropertiesFileNotFoundException, java.io.IOException
groupName
- application group nameappName
- application namePropertiesFileNotFoundException
- if cannot get the application properties filejava.io.IOException
- if cannot load the properties from filepublic static void setApplicationProperties(java.lang.String groupName, java.lang.String appName, javax.management.AttributeList attributes) throws java.io.IOException
groupName
- group name of applicationappName
- application nameattributes
- attributes to be setjava.io.IOException
- if there is an error setting the propertiespublic static void addReadZone(java.lang.String groupName, java.lang.String readZone, javax.management.AttributeList attributes) throws java.io.IOException, java.lang.Exception
groupName
- name of application groupreadZone
- readzone name to addattributes
- attributes to be set on readzonejava.io.IOException
- if there is an error setting the properties on filejava.lang.Exception
- if readzone already existspublic static void addDefaultApp(java.lang.String groupName) throws java.io.IOException, java.lang.Exception
groupName
- attributes
- java.io.IOException
java.lang.Exception
public static void setReadZoneProperties(java.lang.String groupName, java.lang.String readZone, javax.management.AttributeList attributes) throws java.io.IOException, java.lang.Exception
groupName
- name of application groupreadZone
- readzone name to set propertiesattributes
- attributes to be set on readzonejava.io.IOException
- if there is an error setting the properties on filejava.lang.Exception
- if readzone does not existpublic static void setGroupProperties(java.lang.String groupName, javax.management.AttributeList attributes) throws java.io.IOException
groupName
- group name of applicationattributes
- attributes to be setjava.io.IOException
- if there is an error setting the propertiespublic static java.util.Properties getGroupProperties(java.lang.String groupName) throws PropertiesFileNotFoundException, java.io.IOException
groupName
- the name of application groupPropertiesFileNotFoundException
- if cannot get properties filejava.io.IOException
- if cannot load the properties from filepublic static byte[] getServersFile() throws java.lang.Exception
java.lang.Exception
public static byte[] getUIPropertiesFile() throws java.lang.Exception
java.lang.Exception
public static void updateServersFile(java.lang.String content) throws java.lang.Exception
content
- the content to be set in servers.json filejava.io.IOException
java.lang.Exception
public static void updateUIPropertiesFile(java.lang.String content) throws java.lang.Exception
content
- the content to be set in uiproperties.json filejava.io.IOException
java.lang.Exception