org.apache.ace.repository.impl
Class RepositoryFactory

java.lang.Object
  extended by org.apache.ace.repository.impl.RepositoryFactory
All Implemented Interfaces:
org.osgi.service.cm.ManagedServiceFactory

public class RepositoryFactory
extends Object
implements org.osgi.service.cm.ManagedServiceFactory

A ManagedServiceFactory responsible for creating a (Replication)Repository instance for each valid configuration that is received from the ConfigurationAdmin.


Constructor Summary
RepositoryFactory(org.apache.felix.dm.DependencyManager manager)
           
 
Method Summary
 void deleted(String pid)
           
 String getName()
           
 void init()
           
 void updated(String pid, Dictionary dict)
          Creates a new instance if the supplied dictionary contains a valid configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryFactory

public RepositoryFactory(org.apache.felix.dm.DependencyManager manager)
Method Detail

deleted

public void deleted(String pid)
Specified by:
deleted in interface org.osgi.service.cm.ManagedServiceFactory

getName

public String getName()
Specified by:
getName in interface org.osgi.service.cm.ManagedServiceFactory

init

public void init()

updated

public void updated(String pid,
                    Dictionary dict)
             throws org.osgi.service.cm.ConfigurationException
Creates a new instance if the supplied dictionary contains a valid configuration. A configuration is valid if RepositoryConstants.REPOSITORY_NAME and RepositoryConstants.REPOSITORY_CUSTOMER properties are present, not empty and the combination of the two is unique in respect to other previously created instances. Finally a property RepositoryConstants.REPOSITORY_MASTER should be present and be either true or false.

Specified by:
updated in interface org.osgi.service.cm.ManagedServiceFactory
Parameters:
pid - A unique identifier for the instance, generated by ConfigurationAdmin normally.
dict - The configuration properties for the instance, see description above.
Throws:
org.osgi.service.cm.ConfigurationException - If any of the above explanation fails orwhen there is an internal error creating the repository.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.