/**
*
*/
public void createNewManualMeasurementProperty() {
UserBean user = (UserBean)JSFUtil.getManagedObject("UserBean");
if( this.getAddManPropName() == null || this.getAddManPropName().trim().equals("") ) {
log.error("Could not create new manual property: No name.");
return;
}
if( this.getAddManPropDesc() == null || this.getAddManPropDesc().trim().equals("") ) {
log.error("Could not create new manual property: No description.");
return;
}
ManuallyMeasuredProperty mp = ManuallyMeasuredPropertyHandlerImpl.createUserProperty(
user.getUserid(), this.getAddManPropName(), this.getAddManPropDesc() );
// And persist it:
ManuallyMeasuredPropertyHandlerImpl mm = ManuallyMeasuredPropertyHandlerImpl.getInstance();
mm.addManualUserProperty(user.getUserid(), mp );
log.info("Created user property: "+mp+" for user: "+user.getUserid());
this.newManProp = mp.getURI();
// And clear the fields.
this.setAddManPropName("");
this.setAddManPropDesc("");
}