Package org.jboss.managed.plugins

Examples of org.jboss.managed.plugins.DefaultFieldsImpl


                  log.debug("Failed to created Fields", e);
               }
            }
         }
         if (fields == null)
            fields = new DefaultFieldsImpl();

         if( propertyInfo instanceof Serializable )
         {
            Serializable info = Serializable.class.cast(propertyInfo);
            fields.setField(Fields.PROPERTY_INFO, info);
View Full Code Here


                        log.debug("Failed to created Fields", e);
                     }
                  }
               }
               if (fields == null)
                  fields = new DefaultFieldsImpl();

               if( propertyInfo instanceof Serializable )
               {
                  Serializable info = Serializable.class.cast(propertyInfo);
                  fields.setField(Fields.PROPERTY_INFO, info);
View Full Code Here

                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaType metaType = metaTypeFactory.resolve(pinfo.getParameterType());
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
               if (factoryClass == ManagementParameter.NULL_CONSTRAINTS.class)
View Full Code Here

/* 113 */       ManagedObject wrapMO = WrapperAdvice.wrapManagedObject(mo);
/* 114 */       map.put(attachName, wrapMO);
/*     */
/* 116 */       attachName = "FakeConnectionFactoryDeployer.datasource-type";
/* 117 */       ManagedObjectImpl typeMO = new ManagedObjectImpl(attachName);
/* 118 */       DefaultFieldsImpl f21 = new DefaultFieldsImpl();
/* 119 */       f21.setName("datasource-type");
/* 120 */       f21.setDescription("The type of the DataSource");
/* 121 */       f21.setMandatory(true);
/* 122 */       f21.setValue("local-tx-datasource");
/* 123 */       HashSet values = new HashSet();
/* 124 */       values.add(SimpleValueSupport.wrap("local-tx-datasource"));
/* 125 */       values.add(SimpleValueSupport.wrap("no-tx-datasource"));
/* 126 */       values.add(SimpleValueSupport.wrap("xa-datasource"));
/* 127 */       f21.setLegalValues(values);
/* 128 */       f21.setMetaType(SimpleMetaType.STRING);
/* 129 */       ManagedPropertyImpl dsType = new ManagedPropertyImpl(typeMO, f21);
/* 130 */       typeMO.getProperties().put("datasource-type", dsType);
/* 131 */       wrapMO = WrapperAdvice.wrapManagedObject(typeMO);
/* 132 */       map.put(attachName, wrapMO);
/*     */     }
View Full Code Here

/* 225 */     addManagedProperty(fieldName, fieldDescr, mandatory, metaType, null, mo);
/*     */   }
/*     */
/*     */   private void addManagedProperty(String fieldName, String fieldDescr, boolean mandatory, MetaType metaType, Serializable value, ManagedObjectImpl mo)
/*     */   {
/* 235 */     DefaultFieldsImpl fields = new DefaultFieldsImpl();
/* 236 */     setFieldName(fieldName, fields);
/* 237 */     fields.setDescription(fieldDescr);
/* 238 */     fields.setMandatory(mandatory);
/* 239 */     fields.setMetaType(metaType);
/* 240 */     ManagedPropertyImpl mp = new ManagedPropertyImpl(mo, fields);
/* 241 */     super.addProperty(mp);
/* 242 */     if (value != null)
/* 243 */       mp.setValue(value);
/*     */   }
View Full Code Here

/*     */
/*     */   public void start()
/*     */   {
/*  86 */     ManagedObjectImpl mo = new ManagedObjectImpl(this.attachmentName);
/*     */
/*  88 */     DefaultFieldsImpl f0 = new DefaultFieldsImpl();
/*  89 */     setFieldName("jndi-name", f0);
/*  90 */     f0.setDescription("The jndi name to bind the DataSource under");
/*  91 */     f0.setMandatory(true);
/*  92 */     f0.setMetaType(SimpleMetaType.STRING);
/*  93 */     ManagedPropertyImpl jndiName = new ManagedPropertyImpl(mo, f0);
/*  94 */     super.addProperty(jndiName);
/*     */
/*  96 */     DefaultFieldsImpl f1 = new DefaultFieldsImpl();
/*  97 */     setFieldName("connection-url", f1);
/*  98 */     f1.setDescription("The jdbc url of the DataSource");
/*  99 */     f1.setMandatory(true);
/* 100 */     f1.setMetaType(SimpleMetaType.STRING);
/* 101 */     ManagedPropertyImpl conURL = new ManagedPropertyImpl(mo, f1);
/* 102 */     super.addProperty(conURL);
/*     */
/* 104 */     DefaultFieldsImpl f2 = new DefaultFieldsImpl();
/* 105 */     setFieldName("user-name", f2);
/* 106 */     f2.setDescription("The username for the connection-url");
/* 107 */     f2.setMandatory(false);
/* 108 */     f2.setMetaType(SimpleMetaType.STRING);
/* 109 */     ManagedPropertyImpl user = new ManagedPropertyImpl(mo, f2);
/* 110 */     super.addProperty(user);
/*     */
/* 112 */     DefaultFieldsImpl f3 = new DefaultFieldsImpl();
/* 113 */     setFieldName("password", f3);
/* 114 */     f3.setDescription("The password for the connection-url");
/* 115 */     f3.setMandatory(false);
/* 116 */     f3.setMetaType(SimpleMetaType.STRING);
/* 117 */     ManagedPropertyImpl password = new ManagedPropertyImpl(mo, f3);
/* 118 */     super.addProperty(password);
/*     */
/* 120 */     DefaultFieldsImpl f4 = new DefaultFieldsImpl();
/* 121 */     setFieldName("security-domain", f4);
/* 122 */     f4.setDescription("The security-domain used to validate connections");
/* 123 */     f4.setMandatory(false);
/* 124 */     f4.setMetaType(SimpleMetaType.STRING);
/* 125 */     ManagedPropertyImpl secDomain = new ManagedPropertyImpl(mo, f4);
/* 126 */     super.addProperty(secDomain);
/*     */
/* 128 */     DefaultFieldsImpl f5 = new DefaultFieldsImpl();
/* 129 */     setFieldName("driver-class", f5);
/* 130 */     f5.setDescription("The jdbc driver class name");
/* 131 */     f5.setMandatory(true);
/* 132 */     f5.setMetaType(SimpleMetaType.STRING);
/* 133 */     ManagedPropertyImpl driverClass = new ManagedPropertyImpl(mo, f5);
/* 134 */     super.addProperty(driverClass);
/*     */
/* 136 */     DefaultFieldsImpl f6 = new DefaultFieldsImpl();
/* 137 */     setFieldName("connection-properties", f6);
/* 138 */     f6.setDescription("The jdbc driver connection properties");
/* 139 */     f6.setMandatory(false);
/* 140 */     String[] itemNames = { "conn-prop1", "conn-prop2" };
/* 141 */     String[] itemDescriptions = { "conn-prop1 description", "conn-prop2 description" };
/* 142 */     MetaType[] itemTypes = { SimpleMetaType.STRING, SimpleMetaType.STRING };
/* 143 */     CompositeMetaType propsType = new ImmutableCompositeMetaType("java.lang.Properties", "DS connection properties", itemNames, itemDescriptions, itemTypes);
/*     */
/* 145 */     f6.setMetaType(propsType);
/* 146 */     ManagedPropertyImpl connProps = new ManagedPropertyImpl(mo, f6);
/* 147 */     super.addProperty(connProps);
/*     */
/* 150 */     ManagedObjectImpl mo2 = new ManagedObjectImpl(this.dsTypeAttachmentName);
/* 151 */     DefaultFieldsImpl f21 = new DefaultFieldsImpl();
/* 152 */     setFieldName("datasource-type", f21);
/* 153 */     f21.setDescription("The type of the ConnectionFactory");
/* 154 */     f21.setMandatory(true);
/* 155 */     f21.setValue("local-tx-datasource");
/* 156 */     HashSet values = new HashSet();
/* 157 */     values.add(SimpleValueSupport.wrap("local-tx-datasource"));
/* 158 */     values.add(SimpleValueSupport.wrap("no-tx-datasource"));
/* 159 */     values.add(SimpleValueSupport.wrap("xa-datasource"));
/* 160 */     f21.setLegalValues(values);
/* 161 */     f21.setMetaType(SimpleMetaType.STRING);
/* 162 */     ManagedPropertyImpl dsType = new ManagedPropertyImpl(mo2, f21);
/* 163 */     super.addProperty(dsType);
/*     */   }
View Full Code Here

/* 93 */       ManagedObject wrapMO = WrapperAdvice.wrapManagedObject(mo);
/* 94 */       map.put(attachName, wrapMO);
/*    */
/* 96 */       attachName = "FakeConnectionFactoryDeployer.datasource-type";
/* 97 */       ManagedObjectImpl typeMO = new ManagedObjectImpl(attachName);
/* 98 */       DefaultFieldsImpl f21 = new DefaultFieldsImpl();
/* 99 */       f21.setName("datasource-type");
/* 100 */       f21.setDescription("The type of the DataSource");
/* 101 */       f21.setMandatory(true);
/* 102 */       f21.setValue("local-tx-datasource");
/* 103 */       HashSet values = new HashSet();
/* 104 */       values.add(SimpleValueSupport.wrap("local-tx-datasource"));
/* 105 */       values.add(SimpleValueSupport.wrap("no-tx-datasource"));
/* 106 */       values.add(SimpleValueSupport.wrap("xa-datasource"));
/* 107 */       f21.setLegalValues(values);
/* 108 */       f21.setMetaType(SimpleMetaType.STRING);
/* 109 */       ManagedPropertyImpl dsType = new ManagedPropertyImpl(typeMO, f21);
/* 110 */       typeMO.getProperties().put("datasource-type", dsType);
/* 111 */       wrapMO = WrapperAdvice.wrapManagedObject(typeMO);
/* 112 */       map.put(attachName, wrapMO);
/*    */     }
View Full Code Here

/*     */
/*     */   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");
/* 146 */     HashSet values = new HashSet();
/* 147 */     values.add(SimpleValueSupport.wrap("local-tx-datasource"));
/* 148 */     values.add(SimpleValueSupport.wrap("no-tx-datasource"));
/* 149 */     values.add(SimpleValueSupport.wrap("xa-datasource"));
/* 150 */     f21.setLegalValues(values);
/* 151 */     f21.setMetaType(SimpleMetaType.STRING);
/* 152 */     ManagedPropertyImpl dsType = new ManagedPropertyImpl(mo2, f21);
/* 153 */     super.addProperty(dsType);
/*     */   }
View Full Code Here

/* 365 */                 log.debug("Failed to created Fields", e);
/*     */               }
/*     */             }
/*     */           }
/* 369 */           if (fields == null) {
/* 370 */             fields = new DefaultFieldsImpl();
/*     */           }
/* 372 */           if ((propertyInfo instanceof Serializable))
/*     */           {
/* 374 */             Serializable info = (Serializable)Serializable.class.cast(propertyInfo);
/* 375 */             fields.setField("propertyInfo", info);
View Full Code Here

/* 818 */             pdescription = mpa.description();
/*     */           }
/*     */         }
/* 821 */         if (pname == null)
/* 822 */           pname = "arg#" + i;
/* 823 */         Fields fields = new DefaultFieldsImpl(pname);
/* 824 */         if (pdescription != null)
/* 825 */           fields.setField("description", pdescription);
/* 826 */         MetaType metaType = this.metaTypeFactory.resolve(pinfo.getParameterType());
/* 827 */         fields.setField("metaType", metaType);
/*     */         try
/*     */         {
/* 831 */           Class factoryClass = opConstraintsFactor;
/* 832 */           if (factoryClass == ManagementParameter.NULL_CONSTRAINTS.class)
/*     */           {
View Full Code Here

TOP

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

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.