*/
public static JavaEEResource toCustomJavaEEResource(
com.sun.enterprise.config.serverbeans.CustomResource rbean, ResourceInfo resourceInfo) {
CustomResource jr = new CustomResource(resourceInfo);
//jr.setDescription(rbean.getDescription()); // FIXME: getting error
// sets the enable flag
jr.setEnabled( ConnectorsUtil.parseBoolean(rbean.getEnabled()) );
// sets the resource type
jr.setResType( rbean.getResType() );
// sets the factory class name
jr.setFactoryClass( rbean.getFactoryClass() );
// sets the properties
List<Property> properties = rbean.getProperty();
if (properties!= null) {
for(Property property : properties) {
ResourceProperty rp =
new ResourcePropertyImpl(property.getName(), property.getValue());
jr.addProperty(rp);
}
}
return jr;
}