org.alfresco.repo.descriptor
Class ServerDescriptorDAOImpl

java.lang.Object
  extended by org.alfresco.repo.descriptor.ServerDescriptorDAOImpl
All Implemented Interfaces:
DescriptorDAO

public class ServerDescriptorDAOImpl
extends java.lang.Object
implements DescriptorDAO

Manages retrieval of the server Descriptor from a read-only resource file.


Field Summary
protected  java.util.Properties serverProperties
          The server properties.
 
Constructor Summary
ServerDescriptorDAOImpl()
           
 
Method Summary
 Descriptor getDescriptor()
          Create repository descriptor.
 byte[] getLicenseKey()
          Gets the license key.
 void setRepositoryName(java.lang.String repositoryName)
          Sets the repository properties from a resource file.
 void setResource(org.springframework.core.io.Resource descriptorResource)
          Sets the server descriptor from a resource file.
 Descriptor updateDescriptor(Descriptor serverDescriptor, RepoUsage.LicenseMode licenseMode)
          Push the current server descriptor properties into persistence.
 void updateLicenseKey(byte[] key)
          Update license key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverProperties

protected java.util.Properties serverProperties
The server properties.

Constructor Detail

ServerDescriptorDAOImpl

public ServerDescriptorDAOImpl()
Method Detail

setRepositoryName

public void setRepositoryName(java.lang.String repositoryName)
                       throws java.io.IOException
Sets the repository properties from a resource file.

Parameters:
repositoryName - the repository name
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

setResource

public void setResource(org.springframework.core.io.Resource descriptorResource)
                 throws java.io.IOException
Sets the server descriptor from a resource file.

Parameters:
descriptorResource - resource containing server descriptor meta-data
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getDescriptor

public Descriptor getDescriptor()
Description copied from interface: DescriptorDAO
Create repository descriptor.

Specified by:
getDescriptor in interface DescriptorDAO
Returns:
descriptor

getLicenseKey

public byte[] getLicenseKey()
Description copied from interface: DescriptorDAO
Gets the license key.

Specified by:
getLicenseKey in interface DescriptorDAO
Returns:
the license key

updateDescriptor

public Descriptor updateDescriptor(Descriptor serverDescriptor,
                                   RepoUsage.LicenseMode licenseMode)
Description copied from interface: DescriptorDAO
Push the current server descriptor properties into persistence.

Specified by:
updateDescriptor in interface DescriptorDAO
Parameters:
serverDescriptor - the current server descriptor
Returns:
the descriptor
Throws:
java.lang.UnsupportedOperationException

updateLicenseKey

public void updateLicenseKey(byte[] key)
Description copied from interface: DescriptorDAO
Update license key.

Specified by:
updateLicenseKey in interface DescriptorDAO
Parameters:
key - the key


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.