use of jakarta.validation.ConstraintViolationException in project Clownfish by rawdog71.
the class UserList method onCreateUser.
public void onCreateUser(ActionEvent actionEvent) {
try {
CfUser newuser = new CfUser();
newuser.setEmail(email);
newuser.setVorname(vorname);
newuser.setNachname(nachname);
newuser.setAssetref(avatar);
newuser.setPasswort(passwort);
String salt = PasswordUtil.getSalt(30);
String secure = PasswordUtil.generateSecurePassword(passwort, salt);
newuser.setSalt(salt);
newuser.setPasswort(secure);
cfuserService.create(newuser);
userlist = cfuserService.findAll();
} catch (ConstraintViolationException ex) {
LOGGER.error(ex.getMessage());
}
}
use of jakarta.validation.ConstraintViolationException in project Clownfish by rawdog71.
the class KeywordContentList method onCreate.
public void onCreate(ActionEvent actionEvent) {
try {
keywordlistname = keywordlistname.trim().replaceAll("\\s+", "_");
cfkeywordlistService.findByName(keywordlistname);
} catch (NoResultException ex) {
CfKeywordlist newkeywordlist = new CfKeywordlist();
newkeywordlist.setName(keywordlistname);
cfkeywordlistService.create(newkeywordlist);
keywordlist = cfkeywordlistService.findAll();
keywords = cfkeywordService.findAll();
} catch (ConstraintViolationException ex) {
LOGGER.error(ex.getMessage());
}
}
use of jakarta.validation.ConstraintViolationException in project Clownfish by rawdog71.
the class KeywordList method onCreate.
public void onCreate(ActionEvent actionEvent) {
try {
items.stream().forEach((keyword) -> {
try {
cfkeywordService.findByName(keyword);
} catch (NoResultException ex) {
CfKeyword newkeyword = new CfKeyword();
newkeyword.setName(keyword);
cfkeywordService.create(newkeyword);
}
});
globalmessage.displayMessage("Added Keywords");
keywordlist = cfkeywordService.findAll();
assetlist.init();
contentlist.init();
} catch (ConstraintViolationException ex) {
LOGGER.error(ex.getMessage());
}
}
use of jakarta.validation.ConstraintViolationException in project Clownfish by rawdog71.
the class PropertyList method onCreateProperty.
public void onCreateProperty(ActionEvent actionEvent) {
try {
CfProperty newproperty = new CfProperty();
propertykey = propertykey.replaceAll("\\s+", "_");
propertykey = propertykey.replace(".", "_");
newproperty.setHashkey(propertykey);
newproperty.setValue(propertyvalue);
newproperty.setNodelete(false);
cfpropertyService.create(newproperty);
fillPropertyMap();
clownfish.setInitmessage(false);
clownfish.init();
} catch (ConstraintViolationException ex) {
LOGGER.error(ex.getMessage());
}
}
use of jakarta.validation.ConstraintViolationException in project Clownfish by rawdog71.
the class QuartzList method onCreateJob.
public void onCreateJob(ActionEvent actionEvent) {
try {
CfQuartz newquartz = new CfQuartz();
newquartz.setName(jobname);
newquartz.setSchedule(jobvalue);
newquartz.setActive(active);
newquartz.setSiteRef(BigInteger.valueOf(siteref.getId()));
cfquartzService.create(newquartz);
quartzlist = cfquartzService.findAll();
clownfish.setInitmessage(false);
clownfish.init();
// fillPropertyMap();
} catch (ConstraintViolationException ex) {
LOGGER.error(ex.getMessage());
}
}
Aggregations