Package org.jboss.managed.plugins

Examples of org.jboss.managed.plugins.ManagedObjectImpl


/*     */     {
/* 825 */       runtimeOps = createOperationProxies(runtimeMO, runtimeOps);
/* 826 */       ops.addAll(runtimeOps);
/*     */     }
/*     */
/* 829 */     ManagedObjectImpl moi = (ManagedObjectImpl)mo;
/* 830 */     moi.setProperties(props);
/* 831 */     moi.setOperations(ops);
/*     */   }
View Full Code Here


/*  71 */     this.propertyNameMappings = propertyNameMappings;
/*     */   }
/*     */
/*     */   public void start()
/*     */   {
/*  76 */     ManagedObjectImpl mo = new ManagedObjectImpl(this.attachmentName);
/*     */
/*  78 */     DefaultFieldsImpl f0 = new DefaultFieldsImpl();
/*  79 */     setFieldName("jndi-name", f0);
/*  80 */     f0.setDescription("The jndi name to bind the DataSource under");
/*  81 */     f0.setMandatory(true);
/*  82 */     f0.setMetaType(SimpleMetaType.STRING);
/*  83 */     ManagedPropertyImpl jndiName = new ManagedPropertyImpl(mo, f0);
/*  84 */     super.addProperty(jndiName);
/*     */
/*  86 */     DefaultFieldsImpl f1 = new DefaultFieldsImpl();
/*  87 */     setFieldName("connection-url", f1);
/*  88 */     f1.setDescription("The jdbc url of the DataSource");
/*  89 */     f1.setMandatory(true);
/*  90 */     f1.setMetaType(SimpleMetaType.STRING);
/*  91 */     ManagedPropertyImpl conURL = new ManagedPropertyImpl(mo, f1);
/*  92 */     super.addProperty(conURL);
/*     */
/*  94 */     DefaultFieldsImpl f2 = new DefaultFieldsImpl();
/*  95 */     setFieldName("user-name", f2);
/*  96 */     f2.setDescription("The username for the connection-url");
/*  97 */     f2.setMandatory(false);
/*  98 */     f2.setMetaType(SimpleMetaType.STRING);
/*  99 */     ManagedPropertyImpl user = new ManagedPropertyImpl(mo, f2);
/* 100 */     super.addProperty(user);
/*     */
/* 102 */     DefaultFieldsImpl f3 = new DefaultFieldsImpl();
/* 103 */     setFieldName("password", f3);
/* 104 */     f3.setDescription("The password for the connection-url");
/* 105 */     f3.setMandatory(false);
/* 106 */     f3.setMetaType(SimpleMetaType.STRING);
/* 107 */     ManagedPropertyImpl password = new ManagedPropertyImpl(mo, f3);
/* 108 */     super.addProperty(password);
/*     */
/* 110 */     DefaultFieldsImpl f4 = new DefaultFieldsImpl();
/* 111 */     setFieldName("security-domain", f4);
/* 112 */     f4.setDescription("The security-domain used to validate connections");
/* 113 */     f4.setMandatory(false);
/* 114 */     f4.setMetaType(SimpleMetaType.STRING);
/* 115 */     ManagedPropertyImpl secDomain = new ManagedPropertyImpl(mo, f4);
/* 116 */     super.addProperty(secDomain);
/*     */
/* 118 */     DefaultFieldsImpl f5 = new DefaultFieldsImpl();
/* 119 */     setFieldName("driver-class", f5);
/* 120 */     f5.setDescription("The jdbc driver class name");
/* 121 */     f5.setMandatory(true);
/* 122 */     f5.setMetaType(SimpleMetaType.STRING);
/* 123 */     ManagedPropertyImpl driverClass = new ManagedPropertyImpl(mo, f5);
/* 124 */     super.addProperty(driverClass);
/*     */
/* 126 */     DefaultFieldsImpl f6 = new DefaultFieldsImpl();
/* 127 */     setFieldName("connection-properties", f6);
/* 128 */     f6.setDescription("The jdbc driver connection properties");
/* 129 */     f6.setMandatory(false);
/* 130 */     String[] itemNames = { "conn-prop1", "conn-prop2" };
/* 131 */     String[] itemDescriptions = { "conn-prop1 description", "conn-prop2 description" };
/* 132 */     MetaType[] itemTypes = { SimpleMetaType.STRING, SimpleMetaType.STRING };
/* 133 */     CompositeMetaType propsType = new ImmutableCompositeMetaType("java.lang.Properties", "DS connection properties", itemNames, itemDescriptions, itemTypes);
/*     */
/* 135 */     f6.setMetaType(propsType);
/* 136 */     ManagedPropertyImpl connProps = new ManagedPropertyImpl(mo, f6);
/* 137 */     super.addProperty(connProps);
/*     */
/* 140 */     ManagedObjectImpl mo2 = new ManagedObjectImpl(this.dsTypeAttachmentName);
/* 141 */     DefaultFieldsImpl f21 = new DefaultFieldsImpl();
/* 142 */     setFieldName("datasource-type", f21);
/* 143 */     f21.setDescription("The type of the DataSource");
/* 144 */     f21.setMandatory(true);
/* 145 */     f21.setValue("local-tx-datasource");
View Full Code Here

/* 489 */         ManagedOperation op = getManagedOperation(methodInfo, managementOp);
/* 490 */         operations.add(op);
/*     */       }
/*     */     }
/*     */
/* 494 */     ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
/* 495 */     result.setAnnotations(moAnnotations);
/* 496 */     if (nameType != null)
/* 497 */       result.setNameType(nameType);
/* 498 */     if (attachmentName != null)
/* 499 */       result.setAttachmentName(attachmentName);
/* 500 */     if (operations.size() > 0)
/* 501 */       result.setOperations(operations);
/* 502 */     for (ManagedProperty property : properties)
/* 503 */       property.setManagedObject(result);
/* 504 */     return result;
/*     */   }
View Full Code Here

/* 522 */       throw new IllegalArgumentException("Null managed object");
/*     */     }
/* 524 */     if (!(managedObject instanceof ManagedObjectImpl)) {
/* 525 */       throw new IllegalStateException("Unable to create object " + managedObject.getClass().getName());
/*     */     }
/* 527 */     ManagedObjectImpl managedObjectImpl = (ManagedObjectImpl)managedObject;
/* 528 */     Serializable object = createUnderlyingObject(managedObjectImpl, clazz);
/* 529 */     populateManagedObject(managedObject, object);
/*     */   }
View Full Code Here

/*     */   public void populateManagedObject(ManagedObject managedObject, Serializable object)
/*     */   {
/* 534 */     if (!(managedObject instanceof ManagedObjectImpl)) {
/* 535 */       throw new IllegalStateException("Unable to populate managed object " + managedObject.getClass().getName());
/*     */     }
/* 537 */     ManagedObjectImpl managedObjectImpl = (ManagedObjectImpl)managedObject;
/* 538 */     managedObjectImpl.setAttachment(object);
/* 539 */     populateValues(managedObjectImpl, object);
/*     */   }
View Full Code Here

            ManagedOperation op = getManagedOperation(methodInfo, managementOp, metaData);
            operations.add(op);
         }
      }

      ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
      result.setAnnotations(moAnnotations);
      // Set the component name to name if this is a runtime MO with a name specified
      if (isRuntime && name.equals(classInfo.getName()) == false)
         result.setComponentName(name);
      if (nameType != null)
         result.setNameType(nameType);
      if (attachmentName != null)
         result.setAttachmentName(attachmentName);
      if (operations.size() > 0 )
         result.setOperations(operations);
      for (ManagedProperty property : properties)
         property.setManagedObject(result);
      result.setTransientAttachment(BeanInfo.class.getName(), beanInfo);
      return result;
   }
View Full Code Here

TOP

Related Classes of org.jboss.managed.plugins.ManagedObjectImpl

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.