CentraSite Documentation : CentraSite Developer's Guide : Application Framework : Introduction : StandaloneRegistryProvider
StandaloneRegistryProvider
In order to obtain a connection to the repository, an instance of StandAloneRegistryProvider must be created. This registry provider has several important parameters for its creation that will affect the functionality of CSAF. CSAF supports several constructors which exclude some of the properties and use their default values instead. The constructor with full parameter list is:
StandaloneRegistryProvider(String registryUrl, String user,
String password, boolean browserBehaviour){}
registryUrl
The fully qualified URL for the CentraSite registry/repository. Default value is http://localhost:53307
user
The user ID of the CentraSite user.
password
The password of the user identified by the parameter -user.
browserBehaviour
Sets the com.centrasite.jaxr.BrowserBehaviour property of the connection factory. To enable type management, this flag must be set to true; to enable RevisionManagement it must be false. Default value is false.
Example for creating a BeanPool instance by using SessionContext and StandaloneRegistryProvider
SessionContext context = null;
RegistryProvider provider = null;try {
provider = new StandaloneRegistryProvider(registryUsername,
registryPassword, true);
 
Configuration conf = new Configuration();
conf.setRegistryProvider(provider);
conf.addBeanType(Item.class);
conf.addBeanType(Action.class);
conf.addBeanType(Entry.class);
conf.addBeanType(ExternalLink.class);
context = SessionContext.createInstance(conf);
} catch (CSAppFrameworkException e) {
// Do something with the exception
}
 
BeanPool beanPool = context.getCurrentBeanPool();
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback