Package net.solarnetwork.node.backup
Interface BackupResourceProvider
- All Known Implementing Classes:
FileBackupResourceProvider
public interface BackupResourceProvider
A provider of
BackupResource instances.
Any system component can register BackupResourceProvider instances to
include additional resources in backups.
- Version:
- 1.1
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionGet the resources that should be backed up.getKey()Get a key, unique among all otherBackupResourceProviderinstances.providerInfo(Locale locale) Get info about the provider.resourceInfo(BackupResource resource, Locale locale) Get info about a particular resource.booleanrestoreBackupResource(BackupResource resource) Restore aBackupResource.
-
Method Details
-
getKey
String getKey()Get a key, unique among all otherBackupResourceProviderinstances.The key should contain only alpha-numeric and/or the period characters. A good candidate is the full class name of the provider.
- Returns:
- the provider key
-
getBackupResources
Iterable<BackupResource> getBackupResources()Get the resources that should be backed up.- Returns:
- the resources, never null
-
restoreBackupResource
Restore aBackupResource.- Parameters:
resource- the resource to restore- Returns:
- true if successful, false otherwise
-
providerInfo
Get info about the provider.- Parameters:
locale- The desired locale of the information, or null for the system locale.- Returns:
- The info.
- Since:
- 1.1
-
resourceInfo
Get info about a particular resource.- Parameters:
resource- The resource to get the information for.locale- The desired locale of the information, or null for the system locale.- Returns:
- The info, or null if none available.
- Since:
- 1.1
-