Class OrderedPropertyStore
- java.lang.Object
-
- com.sun.identity.install.tools.configurator.OrderedPropertyStore
-
- All Implemented Interfaces:
ICommonToolsConstants,InstallConstants
- Direct Known Subclasses:
InstFinderStore,MigrateFromInstFinderStore
public abstract class OrderedPropertyStore extends Object implements InstallConstants
An abstract class which encapulates the functionality to save/load properties to/from a file. Also the order of the properties are preserved.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSTR_KEY_COMMENT_MARKERstatic StringSTR_KEY_VALUE_SEPstatic StringSTR_KEY_VALUE_SEP_AND_SPACE-
Fields inherited from interface com.sun.identity.install.tools.admin.ICommonToolsConstants
FILE_SEP, INSTANCE_AUDIT_DIR_NAME, INSTANCE_CONFIG_DIR_NAME, INSTANCE_DEBUG_DIR_NAME, INSTANCE_LIB_DIR_NAME, INSTANCE_LOCALE_DIR_NAME, INSTANCE_LOGS_DIR_NAME, LINE_SEP
-
Fields inherited from interface com.sun.identity.install.tools.configurator.InstallConstants
INT_OPERATION_TYPE_REGULAR, INT_OPERATION_TYPE_SAVE_RESPONSE, INT_OPERATION_TYPE_USE_RESPONSE, LOC_DR_ERR_APP_SERVER_HOME_LOCATOR, LOC_DR_ERR_CORRUPT_PRODUCT_INSTALL, LOC_DR_ERR_INVALID_INSTALL_HOME, LOC_DR_ERR_PRODUCT_ALREADY_MIGRATED, LOC_DR_ERR_PRODUCT_LOCATOR_BACKUP, LOC_DR_ERR_PRODUCT_LOCATOR_READ, LOC_DR_ERR_PRODUCT_LOCATOR_WRITE, LOC_DR_MSG_PRODUCT_SUMM_INFO_BEGIN, LOC_DR_MSG_PRODUCT_SUMM_INFO_BEGIN_LINE, LOC_DR_MSG_PRODUCT_SUMM_INFO_END, LOC_IS_ERR_LOAD_INSTALL_STATE, LOC_IS_ERR_SAVE_INSTALL_STATE, STR_AUDIT_DIR_PREFIX_TAG, STR_BEGIN_END_LINE_MARKER, STR_CONFIG_AGENT_CONFIG_FILE_PATH_TAG, STR_CONFIG_AGENT_MIGRATE_FILE_PATH_TAG, STR_CONFIG_DIR_PREFIX_MIGRATE_TAG, STR_CONFIG_DIR_PREFIX_TAG, STR_CONFIG_FILE_PATH_TAG, STR_CREATE_AGENT_PROFILE_KEY, STR_CREATE_AGENT_PROFILE_NAME, STR_CUSTOM, STR_DEBUG_DIR_PREFIX_TAG, STR_INSTALL, STR_INSTANCE_NAME_MIGRATE_TAG, STR_IS_GLOBAL_DATA_ID, STR_LOG_CONFIG_FILE_PATH, STR_LOG_CONFIG_FILENAME, STR_MIGRATE, STR_SAVE_AGENT_INSTANCE_NAME_KEY, STR_SAVE_REMOTE_AGENT_INSTALL_DIR_KEY, STR_UNINSTALL, STR_VERSION_FILE_NAME
-
-
Constructor Summary
Constructors Constructor Description OrderedPropertyStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetFile()abstract StringgetFileHeader()abstract LocalizedMessagegetInvalidKeyErrorMessage(int lineNumber)abstract LocalizedMessagegetInvalidLineErrorMessage(int lineNumber)abstract LocalizedMessagegetLoadErrorMessage()StringgetProperty(String key)StringgetPropertyKey(int index)SetgetPropertyKeys()StringgetPropertyValue(int index)SetgetPropertyValues()abstract LocalizedMessagegetSaveErrorMessage()booleanisEmpty()voidload()voidremoveProperty(int index)voidremoveProperty(String key)voidsave()voidsetProperty(String key, String value)intsize()StringtoString()
-
-
-
Field Detail
-
STR_KEY_VALUE_SEP
public static final String STR_KEY_VALUE_SEP
- See Also:
- Constant Field Values
-
STR_KEY_COMMENT_MARKER
public static final String STR_KEY_COMMENT_MARKER
- See Also:
- Constant Field Values
-
STR_KEY_VALUE_SEP_AND_SPACE
public static final String STR_KEY_VALUE_SEP_AND_SPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFile
public abstract String getFile()
-
getFileHeader
public abstract String getFileHeader()
-
getLoadErrorMessage
public abstract LocalizedMessage getLoadErrorMessage()
-
getSaveErrorMessage
public abstract LocalizedMessage getSaveErrorMessage()
-
getInvalidKeyErrorMessage
public abstract LocalizedMessage getInvalidKeyErrorMessage(int lineNumber)
-
getInvalidLineErrorMessage
public abstract LocalizedMessage getInvalidLineErrorMessage(int lineNumber)
-
load
public void load() throws InstallException- Throws:
InstallException
-
save
public void save() throws InstallException- Throws:
InstallException
-
getPropertyKey
public String getPropertyKey(int index)
-
getPropertyValue
public String getPropertyValue(int index)
-
removeProperty
public void removeProperty(int index)
-
removeProperty
public void removeProperty(String key)
-
getPropertyValues
public Set getPropertyValues()
-
getPropertyKeys
public Set getPropertyKeys()
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
-