Package org.alfresco.repo.descriptor
Class ServerDescriptorDAOImpl
- java.lang.Object
-
- org.alfresco.repo.descriptor.ServerDescriptorDAOImpl
-
- All Implemented Interfaces:
DescriptorDAO
public class ServerDescriptorDAOImpl extends Object implements DescriptorDAO
Manages retrieval of the server Descriptor from a read-only resource file.
-
-
Field Summary
Fields Modifier and Type Field Description protected PropertiesserverPropertiesThe server properties.
-
Constructor Summary
Constructors Constructor Description ServerDescriptorDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DescriptorgetDescriptor()Create repository descriptor.byte[]getLicenseKey()Gets the license key.voidsetRepositoryName(String repositoryName)Sets the repository properties from a resource file.voidsetResource(org.springframework.core.io.Resource[] locations)Sets the server descriptor from a resource file.DescriptorupdateDescriptor(Descriptor serverDescriptor, RepoUsage.LicenseMode licenseMode)Push the current server descriptor properties into persistence.voidupdateLicenseKey(byte[] key)Update license key.
-
-
-
Field Detail
-
serverProperties
protected Properties serverProperties
The server properties.
-
-
Method Detail
-
setRepositoryName
public void setRepositoryName(String repositoryName) throws IOException
Sets the repository properties from a resource file.- Parameters:
repositoryName- the repository name- Throws:
IOException- Signals that an I/O exception has occurred.
-
setResource
public void setResource(org.springframework.core.io.Resource[] locations) throws IOExceptionSets the server descriptor from a resource file.- Parameters:
locations- resources containing server descriptor meta-data- Throws:
IOException- Signals that an I/O exception has occurred.
-
getDescriptor
public Descriptor getDescriptor()
Description copied from interface:DescriptorDAOCreate repository descriptor.- Specified by:
getDescriptorin interfaceDescriptorDAO- Returns:
- descriptor
-
getLicenseKey
public byte[] getLicenseKey()
Description copied from interface:DescriptorDAOGets the license key.- Specified by:
getLicenseKeyin interfaceDescriptorDAO- Returns:
- the license key
-
updateDescriptor
public Descriptor updateDescriptor(Descriptor serverDescriptor, RepoUsage.LicenseMode licenseMode)
Description copied from interface:DescriptorDAOPush the current server descriptor properties into persistence.- Specified by:
updateDescriptorin interfaceDescriptorDAO- Parameters:
serverDescriptor- the current server descriptor- Returns:
- the descriptor
- Throws:
UnsupportedOperationException
-
updateLicenseKey
public void updateLicenseKey(byte[] key)
Description copied from interface:DescriptorDAOUpdate license key.- Specified by:
updateLicenseKeyin interfaceDescriptorDAO- Parameters:
key- the key
-
-