public Object run(Property p) throws PropertyVetoException, TransactionFailure { p.setValue("true"); return null; } }, prop);
public Object run(Property p) throws PropertyVetoException, TransactionFailure { p.setValue("true"); return null; } }, prop);
private void createProperty(Property p) throws PropertyVetoException { for (int i = 0; i < parser.getAttributeCount(); i++) { String attr = parser.getAttributeLocalName(i); String val = parser.getAttributeValue(i); if (attr.equals("name")) { p.setName(val); } if (attr.equals("value")) { p.setValue(val); } } }
private void createProperty(Property p) throws PropertyVetoException { for (int i = 0; i < parser.getAttributeCount(); i++) { String attr = parser.getAttributeLocalName(i); String val = parser.getAttributeValue(i); if (attr.equals("name")) { p.setName(val); } if (attr.equals("value")) { p.setValue(val); } } }
private void secureRestAuthURL(final Transaction t, final Config config_w, final boolean newEnabledState) throws TransactionFailure { try { final ProviderConfig pc = findProviderConfig(config_w); if (pc == null) { return; } final Property p = pc.getProperty(REST_AUTH_URL_PROPERTY_NAME); final Property p_w = t.enroll(p); final String urlText = p_w.getValue(); final StringBuilder newURLString = new StringBuilder(); newURLString.append(newEnabledState ? "https" : "http"); newURLString.append("://").append(urlText.substring(urlText.indexOf("//") + "//".length())); p_w.setValue(newURLString.toString()); } catch (Exception ex) { throw new RuntimeException(ex); } }
public Object run(AuthRealm updatedAuthRealm) throws PropertyVetoException, TransactionFailure { Property prop1 = updatedAuthRealm.createChild(Property.class); prop1.setName(PARAM_DIGEST_ALGORITHM); prop1.setValue("MD5"); updatedAuthRealm.getProperty().add(prop1); return null; } }, authRealm);
public Object run(AuthRealm updatedAuthRealm) throws PropertyVetoException, TransactionFailure { Property prop1 = updatedAuthRealm.createChild(Property.class); prop1.setName(PARAM_DIGEST_ALGORITHM); prop1.setValue("MD5"); updatedAuthRealm.getProperty().add(prop1); return null; } }, authRealm);
@Override public Object run(AdminService adminService) throws PropertyVetoException, TransactionFailure { Property newProp = adminService.createChild(Property.class); adminService.getProperty().add(newProp); newProp.setName(propName); newProp.setValue(propValue); return newProp; } }, adminService);
private void populateAuditModuleElement(AuditModule newAuditModule) throws PropertyVetoException, TransactionFailure { newAuditModule.setName(auditModuleName); newAuditModule.setClassname(className); if (properties != null) { for (Object propname: properties.keySet()) { Property newprop = newAuditModule.createChild(Property.class); newprop.setName((String) propname); newprop.setValue(properties.getProperty((String) propname)); newAuditModule.getProperty().add(newprop); } } } }
public Object run(EjbTimerService ts) throws PropertyVetoException, TransactionFailure { Property prop = ts.createChild(Property.class); ts.getProperty().add(prop); prop.setName(EjbContainerUtil.TIMER_SERVICE_UPGRADED); prop.setValue("false"); ts.setMinimumDeliveryIntervalInMillis(minDelivery); return null; } }, ts);
private void populateAuthRealmElement(AuthRealm newAuthRealm) throws PropertyVetoException, TransactionFailure { newAuthRealm.setName(authRealmName); newAuthRealm.setClassname(className); if (properties != null) { for (Object propname: properties.keySet()) { Property newprop = newAuthRealm.createChild(Property.class); newprop.setName((String) propname); String propValue = properties.getProperty((String) propname); newprop.setValue(propValue); newAuthRealm.getProperty().add(newprop); } } }
private void populateAuditModuleElement(AuditModule newAuditModule) throws PropertyVetoException, TransactionFailure { newAuditModule.setName(auditModuleName); newAuditModule.setClassname(className); if (properties != null) { for (Object propname: properties.keySet()) { Property newprop = newAuditModule.createChild(Property.class); newprop.setName((String) propname); newprop.setValue(properties.getProperty((String) propname)); newAuditModule.getProperty().add(newprop); } } } }
public Object run(EjbTimerService ts) throws PropertyVetoException, TransactionFailure { Property prop = ts.createChild(Property.class); ts.getProperty().add(prop); prop.setName(EjbContainerUtil.TIMER_SERVICE_UPGRADED); prop.setValue("false"); ts.setMinimumDeliveryIntervalInMillis(minDelivery); return null; } }, ts);
/** * Adds a property with the specified name and value to a writable config * object. * @param <T> the type of the config object * @param propName name of the property to add * @param propValue value of the property to add * @param owner_w the owning config object * @return the added Property object * @throws TransactionFailure * @throws PropertyVetoException */ private <T extends PropertyBag & ConfigBeanProxy> Property addProperty( final String propName, final String propValue, final T owner_w) throws TransactionFailure, PropertyVetoException { final Property p = owner_w.createChild(Property.class); p.setName(propName); p.setValue(propValue); owner_w.getProperty().add(p); return p; }
@Override public Object run(VirtualMachineConfig wConfig) throws PropertyVetoException, TransactionFailure { Property wProperty = wConfig.createChild(Property.class); wProperty.setName(VirtualMachine.PropertyName.INSTALL_DIR.toString()); wProperty.setValue(installDir); wConfig.getProperty().add(wProperty); return wProperty; } }, vmConfig);
public Object run(Service serviceConfig) throws PropertyVetoException, TransactionFailure { Property property = serviceConfig.getProperty(propName); if (property != null) { Transaction t = Transaction.getTransaction(serviceConfig); Property p_w = t.enroll(property); p_w.setValue(propValue); } else { Property prop = serviceConfig.createChild(Property.class); prop.setName(propName); prop.setValue(propValue); serviceConfig.getProperty().add(prop); } return serviceConfig; } }, matchingService) == null) {
private void populateAuthRealmElement(AuthRealm newAuthRealm) throws PropertyVetoException, TransactionFailure { newAuthRealm.setName(authRealmName); newAuthRealm.setClassname(className); if (properties != null) { for (Object propname: properties.keySet()) { Property newprop = newAuthRealm.createChild(Property.class); newprop.setName((String) propname); String propValue = properties.getProperty((String) propname); if (propValue != null && propValue.contains("$")) { propValue = RelativePathResolver.resolvePath(propValue); } newprop.setValue(propValue); newAuthRealm.getProperty().add(newprop); } } } }
public Object run(JavaConfig param) throws PropertyVetoException, TransactionFailure { Profiler newProfiler = param.createChild(Profiler.class); newProfiler.setName(name); newProfiler.setClasspath(classpath); newProfiler.setEnabled(enabled.toString()); newProfiler.setNativeLibraryPath(nativeLibraryPath); if (properties != null) { for ( Map.Entry e : properties.entrySet()) { Property prop = newProfiler.createChild(Property.class); prop.setName((String)e.getKey()); prop.setValue((String)e.getValue()); newProfiler.getProperty().add(prop); } } param.setProfiler(newProfiler); return newProfiler; } }, javaConfig);
private JdbcResource createConfigBean(Resources param, Properties properties) throws PropertyVetoException, TransactionFailure { JdbcResource jdbcResource = param.createChild(JdbcResource.class); jdbcResource.setJndiName(jndiName); if (description != null) { jdbcResource.setDescription(description); } jdbcResource.setPoolName(poolName); jdbcResource.setEnabled(enabled); if (properties != null) { for ( Map.Entry e : properties.entrySet()) { Property prop = jdbcResource.createChild(Property.class); prop.setName((String)e.getKey()); prop.setValue((String)e.getValue()); jdbcResource.getProperty().add(prop); } } return jdbcResource; }
public Object run(JmsService param) throws PropertyVetoException, TransactionFailure { JmsHost jmsHost = param.createChild(JmsHost.class); //TODO: need a way to create a JmsHost instance jmsHost.setAdminPassword(mqpassword); jmsHost.setAdminUserName(mquser); jmsHost.setName(jmsHostName); jmsHost.setHost(mqhost); jmsHost.setPort(mqport); if(props != null) { for (Map.Entry e: props.entrySet()){ Property prop = jmsHost.createChild(Property.class); prop.setName((String)e.getKey()); prop.setValue((String)e.getValue()); jmsHost.getProperty().add(prop); } } param.getJmsHost().add(jmsHost); return jmsHost; } }, jmsservice);