public static ConnectedAccount of(boolean authenticationRequired, Account account) { Entity.isEntityDefined(account, "Account must be defined"); return new ConnectedAccount(authenticationRequired, account); }
@Override public void savePredefinedPromotionLevel(PredefinedPromotionLevel stamp) { // Validation isEntityDefined(stamp, "Predefined promotion level must be defined"); // Security securityService.checkGlobalFunction(GlobalSettings.class); // Repository predefinedPromotionLevelRepository.savePredefinedPromotionLevel(stamp); }
@Override public void savePredefinedValidationStamp(PredefinedValidationStamp stamp) { // Validation isEntityDefined(stamp, "Predefined validation stamp must be defined"); // Security securityService.checkGlobalFunction(GlobalSettings.class); // Repository predefinedValidationStampRepository.savePredefinedValidationStamp(stamp); }
public static PromotionLevel of(Branch branch, NameDescription nameDescription) { Entity.isEntityDefined(branch, "Branch must be defined"); Entity.isEntityDefined(branch.getProject(), "Project must be defined"); return new PromotionLevel(ID.NONE, nameDescription.getName(), nameDescription.getDescription(), branch, false, Signature.none() ); }
public static ValidationStamp of(Branch branch, NameDescription nameDescription) { Entity.isEntityDefined(branch, "Branch must be defined"); Entity.isEntityDefined(branch.getProject(), "Project must be defined"); return new ValidationStamp( ID.NONE, nameDescription.getName(), nameDescription.getDescription(), branch, null, false, Signature.none(), null ); }