| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| private static class | StorageFactoryService.
Helper class for common file operations on the service properties files. |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String | |
| private StorageFactory | |
| private char | |
| private static final String | SERVICE_PROPERTIES_EOF_TOKEN
Marker printed as the last line of the service properties file. |
| private final Class | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | createDataWarningFile(StorageFactory
StorageFactory will be used to create the file sf)Implements org. Put a readme file in database directory which will caution users against touching any files in the directory. |
| public String | createServiceRoot(final String name, final boolean deleteExisting)
Implements org. Properties cannot be saved |
| private final boolean | Returns: true if the file exists, false if not.the file to check file)Checks if the specified file exists. |
| public Enumeration | getBootTimeServices()
Implements org. Return a list of all the directoies in the system directory. |
| public String | getCanonicalServiceName(String name)
Implements org. Convert a service name into its canonical form. |
| private String | |
| private static ModuleFactory | |
| private static String | Returns: The file path, either alaFile.getCanonicalPath or
File.getPath.the file to get the path to file)Helper method returning the "best-effort-most-accurate" path. |
| private String | Returns: An empty string if the protocol is the default one (PersistentService.DIRECTORY), the subsub protocol name followed by colon otherwise.Returns the protocol lead in for this service. |
| public Properties | Returns: A Properties object or null if serviceName does not represent a valid service.Implements org. Open the service properties in the directory identified by the service name. |
| public Class | Returns: the StorageFactory class.Get the StorageFactory implementation for this PersistentService |
| public StorageFactory | Returns: An initialized StorageFactory.If true and the database name is not absolute then the database directory will be
relative to the home directory, if one is defined in the properties file. useHome, final String The name of the database (directory). The name does not include the subSubProtocol.
If null then the storage factory will only be used to deal with the directory containing
the databases. databaseName, final String The name of the temporary file directory set in properties. If null then a default
directory should be used. Each database should get a separate temporary file
directory within this one to avoid collisions. tempDirName, final String A unique name that can be used to create the temporary file directory for this database.
If null then temporary files will not be created in this StorageFactory instance. uniqueName)Implements org. Get an initialized StorageFactoryInstance |
| public String | getType()
Implements org. The type of the service is 'directory' |
| public String | getUserServiceName(String serviceName)
Implements org. Return the user form of a service name. |
| public boolean | Returns: true if the PersistentService has a StorageFactory, false if not.Implements org.
|
| public boolean | isSameService(String serviceName1, String serviceName2)
Implements org.
|
| private StorageFactory | privGetStorageFactoryInstance(boolean useHome, String databaseName, String tempDirName, String uniqueName)
|
| protected String | |
| private StandardException | |
| public boolean | removeServiceRoot(final String serviceName)
Implements org. Remove a service's root and its contents. |
| private void | resolveServicePropertiesFiles(StorageFactory
the storage factory for the service sf, StorageFile the service properties file spf)Resolves situations where a failure condition left the service properties file, and/or the service properties file backup, in an inconsistent state. |
| public void | saveServiceProperties(final String serviceName, StorageFactory sf, final Properties properties, final boolean replace)
Implements org.
|
| public void | saveServiceProperties(final String
backup location of the service serviceName, final Properties the properties to save properties)Implements org. Save service.properties during backup |
| private StandardException | |
| private void | vetService(StorageFactory storageFactory, String serviceName)
Verify that the service directory looks ok before objecting that the database already exists. |
| canonicalHome | back to summary |
|---|---|
| private String canonicalHome | |
| home | back to summary |
|---|---|
| private String home | |
| rootStorageFactory | back to summary |
|---|---|
| private StorageFactory rootStorageFactory | |
| separatorChar | back to summary |
|---|---|
| private char separatorChar | |
| SERVICE_PROPERTIES_EOF_TOKEN | back to summary |
|---|---|
| private static final String SERVICE_PROPERTIES_EOF_TOKEN Marker printed as the last line of the service properties file. | |
| storageFactoryClass | back to summary |
|---|---|
| private final Class<?> storageFactoryClass | |
| subSubProtocol | back to summary |
|---|---|
| private final String subSubProtocol | |
| StorageFactoryService | back to summary |
|---|---|
| pack-priv StorageFactoryService(String subSubProtocol, Class<T> storageFactoryClass) throws StandardException | |
| createDataWarningFile | back to summary |
|---|---|
| public void createDataWarningFile(StorageFactory sf) throws StandardException Implements org. Doc from org. Put a readme file in database directory which will caution users against touching any files in the directory. This file will be created at database creation time.
| |
| createServiceRoot | back to summary |
|---|---|
| public String createServiceRoot(final String name, final boolean deleteExisting) throws StandardException Implements org. Properties cannot be saved
| |
| fileExists | back to summary |
|---|---|
| private final boolean fileExists(final File file) Checks if the specified file exists.
| |
| getBootTimeServices | back to summary |
|---|---|
| public Enumeration Implements org. Return a list of all the directoies in the system directory. | |
| getCanonicalServiceName | back to summary |
|---|---|
| public String getCanonicalServiceName(String name) throws StandardException Implements org. Doc from org. Convert a service name into its canonical form. Returns null if the name cannot be converted into a canonical form.
| |
| getDirectoryPath | back to summary |
|---|---|
| private String getDirectoryPath(String name) | |
| getMonitor | back to summary |
|---|---|
| private static ModuleFactory getMonitor() Must be private so that user code can't call this entry point. | |
| getMostAccuratePath | back to summary |
|---|---|
| private static String getMostAccuratePath(StorageFile file) Helper method returning the "best-effort-most-accurate" path.
| |
| getProtocolLeadIn | back to summary |
|---|---|
| private String getProtocolLeadIn() Returns the protocol lead in for this service.
| |
| getServiceProperties | back to summary |
|---|---|
| public Properties getServiceProperties(final String serviceName, Properties defaultProperties) throws StandardException Implements org. Open the service properties in the directory identified by the service name.
| |
| getStorageFactoryClass | back to summary |
|---|---|
| public Class Get the StorageFactory implementation for this PersistentService
| |
| getStorageFactoryInstance | back to summary |
|---|---|
| public StorageFactory getStorageFactoryInstance(final boolean useHome, final String databaseName, final String tempDirName, final String uniqueName) throws StandardException, IOException Implements org. Get an initialized StorageFactoryInstance
| |
| getType | back to summary |
|---|---|
| public String getType() Implements org. The type of the service is 'directory'
| |
| getUserServiceName | back to summary |
|---|---|
| public String getUserServiceName(String serviceName) Implements org. Doc from org. Return the user form of a service name. This name is only valid within this system. The separator character used must be '/' | |
| hasStorageFactory | back to summary |
|---|---|
| public boolean hasStorageFactory() Implements org.
| |
| isSameService | back to summary |
|---|---|
| public boolean isSameService(String serviceName1, String serviceName2) Implements org. | |
| privGetStorageFactoryInstance | back to summary |
|---|---|
| private StorageFactory privGetStorageFactoryInstance(boolean useHome, String databaseName, String tempDirName, String uniqueName) throws InstantiationException, IllegalAccessException, IOException, NoSuchMethodException, InvocationTargetException | |
| recreateServiceRoot | back to summary |
|---|---|
| protected String recreateServiceRoot(final String serviceName, Properties properties) throws StandardException | |
| registeredClassInstanceError | back to summary |
|---|---|
| private StandardException registeredClassInstanceError(Exception e) | |
| removeServiceRoot | back to summary |
|---|---|
| public boolean removeServiceRoot(final String serviceName) Implements org. Doc from org. Remove a service's root and its contents. | |
| resolveServicePropertiesFiles | back to summary |
|---|---|
| private void resolveServicePropertiesFiles(StorageFactory sf, StorageFile spf) throws StandardException Resolves situations where a failure condition left the service properties file, and/or the service properties file backup, in an inconsistent state. Note that this method doesn't resolve the situation where both the current service properties file and the backup file are missing.
| |
| saveServiceProperties | back to summary |
|---|---|
| public void saveServiceProperties(final String serviceName, StorageFactory sf, final Properties properties, final boolean replace) throws StandardException Implements org.
| |
| saveServiceProperties | back to summary |
|---|---|
| public void saveServiceProperties(final String serviceName, final Properties properties) throws StandardException Implements org. Save service.properties during backup
| |
| serviceDirectoryCreateError | back to summary |
|---|---|
| private StandardException serviceDirectoryCreateError(Exception t, String name) | |
| vetService | back to summary |
|---|---|
| private void vetService(StorageFactory storageFactory, String serviceName) throws StandardException Verify that the service directory looks ok before objecting that the database already exists. | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private String[] | |
| private static final int | |
| private int | |
| private static final int | |
| private StorageFile | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | hasMoreElements()
Implements java. Tests if this enumeration contains more elements. |
| public Object | nextElement()
Implements java. Returns the next element of this enumeration if this enumeration object has at least one more element to provide. |
| public final StorageFactoryService. |
| actionCode | back to summary |
|---|---|
| private int actionCode | |
| contents | back to summary |
|---|---|
| private String[] contents | |
| HAS_MORE_ELEMENTS_ACTION | back to summary |
|---|---|
| private static final int HAS_MORE_ELEMENTS_ACTION | |
| index | back to summary |
|---|---|
| private int index | |
| INIT_ACTION | back to summary |
|---|---|
| private static final int INIT_ACTION | |
| systemDirectory | back to summary |
|---|---|
| private StorageFile systemDirectory | |
| validIndex | back to summary |
|---|---|
| private boolean validIndex | |
| DirectoryList | back to summary |
|---|---|
| pack-priv DirectoryList() | |
| hasMoreElements | back to summary |
|---|---|
| public boolean hasMoreElements() Implements java. Doc from java. Tests if this enumeration contains more elements.
| |
| nextElement | back to summary |
|---|---|
| public Object nextElement() throws NoSuchElementException Implements java. Doc from java. Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
| |
| run | back to summary |
|---|---|
| public final StorageFactoryService. | |
Introduced to take care of error reporting for common file operations carried out in StorageFactoryService.
| Modifier and Type | Field and Description |
|---|---|
| private String | operation
Name of the most recently performed operation. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean |
| operation | back to summary |
|---|---|
| private String operation Name of the most recently performed operation. | |
| FileOperationHelper | back to summary |
|---|---|
| private FileOperationHelper() | |
| delete | back to summary |
|---|---|
| pack-priv boolean delete(StorageFile file, boolean mustSucceed) throws StandardException | |
| exists | back to summary |
|---|---|
| pack-priv boolean exists(StorageFile file, boolean mustSucceed) throws StandardException | |
| renameTo | back to summary |
|---|---|
| pack-priv boolean renameTo(StorageFile from, StorageFile to, boolean mustSucceed) throws StandardException | |