Package org.nasutekds.server.admin

Examples of org.nasutekds.server.admin.ClassPropertyDefinition$Builder


    throws ConfigException
  {
    String className = configuration.getJavaClass();
    SynchronizationProviderCfgDefn d =
      SynchronizationProviderCfgDefn.getInstance();
    ClassPropertyDefinition pd =
      d.getJavaClassPropertyDefinition();

    // Load the class
    Class<? extends SynchronizationProvider> theClass;
    SynchronizationProvider<SynchronizationProviderCfg> provider;
    try
    {
       theClass = pd.loadClass(className, SynchronizationProvider.class);
    } catch (Exception e)
    {
       // Handle the exception: put a message in the unacceptable reasons.
       Message message = ERR_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS.
           get(String.valueOf(className), String.valueOf(configuration.dn()),
View Full Code Here


      List<Message> unacceptableReasons)
  {
    String className = configuration.getJavaClass();
    SynchronizationProviderCfgDefn d =
      SynchronizationProviderCfgDefn.getInstance();
    ClassPropertyDefinition pd =
      d.getJavaClassPropertyDefinition();

    // Load the class and cast it to a synchronizationProvider.
    SynchronizationProvider provider = null;
    Class<? extends SynchronizationProvider> theClass;
    try
    {
       theClass = pd.loadClass(className, SynchronizationProvider.class);
       provider = theClass.newInstance();
    } catch (Exception e)
    {
       // Handle the exception: put a message in the unacceptable reasons.
       Message message = ERR_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS.get(
View Full Code Here

  private boolean isJavaClassAcceptable(LogRetentionPolicyCfg config,
                                        List<Message> unacceptableReasons)
  {
    String className = config.getJavaClass();
    LogRetentionPolicyCfgDefn d = LogRetentionPolicyCfgDefn.getInstance();
    ClassPropertyDefinition pd =
        d.getJavaClassPropertyDefinition();
    // Load the class and cast it to a RetentionPolicy.
    Class<? extends RetentionPolicy> theClass;
    try {
      theClass = pd.loadClass(className, RetentionPolicy.class);
      theClass.newInstance();
    } catch (Exception e) {
      Message message = ERR_CONFIG_RETENTION_POLICY_INVALID_CLASS.get(className,
                                  config.dn().toString(),
                                  String.valueOf(e));
View Full Code Here

  private RetentionPolicy getRetentionPolicy(LogRetentionPolicyCfg config)
      throws ConfigException {
    String className = config.getJavaClass();
    LogRetentionPolicyCfgDefn d = LogRetentionPolicyCfgDefn.getInstance();
    ClassPropertyDefinition pd =
        d.getJavaClassPropertyDefinition();
    // Load the class and cast it to a RetentionPolicy.
    Class<? extends RetentionPolicy> theClass;
    RetentionPolicy RetentionPolicy;
    try {
      theClass = pd.loadClass(className, RetentionPolicy.class);
      RetentionPolicy = theClass.newInstance();

      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
View Full Code Here

  {
    try
    {
      ExtensionCfgDefn definition =
              ExtensionCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends Extension> extensionClass =
           propertyDefinition.loadClass(className, Extension.class);
      Extension extension = extensionClass.newInstance();


      if (initialize)
      {
View Full Code Here

          throws InitializationException
  {
    try
    {
      AlertHandlerCfgDefn definition = AlertHandlerCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends AlertHandler> handlerClass =
           propertyDefinition.loadClass(className, AlertHandler.class);
      AlertHandler handler = handlerClass.newInstance();

      if (initialize)
      {
        Method method = handler.getClass().getMethod("initializeAlertHandler",
View Full Code Here

  {
    try
    {
      MonitorProviderCfgDefn definition =
           MonitorProviderCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends MonitorProvider> providerClass =
           propertyDefinition.loadClass(className, MonitorProvider.class);
      MonitorProvider monitor = providerClass.newInstance();

      if (configuration != null)
      {
        Method method = monitor.getClass().getMethod(
View Full Code Here

       throws InitializationException
  {
    try
    {
      PasswordStorageSchemeCfgDefn definition;
      ClassPropertyDefinition propertyDefinition;
      Class<? extends PasswordStorageScheme> schemeClass;
      PasswordStorageScheme<? extends PasswordStorageSchemeCfg>
          passwordStorageScheme;

      definition = PasswordStorageSchemeCfgDefn.getInstance();
      propertyDefinition = definition.getJavaClassPropertyDefinition();
      schemeClass = propertyDefinition.loadClass(
          className,
          PasswordStorageScheme.class
          );
      passwordStorageScheme =
        (PasswordStorageScheme<? extends PasswordStorageSchemeCfg>)
View Full Code Here

    try
    {
      MatchingRuleFactory factory = null;
      MatchingRuleCfgDefn definition =
              MatchingRuleCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends MatchingRuleFactory> matchingRuleFactoryClass =
           propertyDefinition.loadClass(className,
                                        MatchingRuleFactory.class);
      factory = matchingRuleFactoryClass.newInstance();

      if (initialize)
      {
View Full Code Here

TOP

Related Classes of org.nasutekds.server.admin.ClassPropertyDefinition$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.