//@Transactional(readOnly = false) //@Audit(action = "SAVE_SERVICE", actionResolverName = "SAVE_SERVICE_ACTION_RESOLVER", resourceResolverName = "SAVE_SERVICE_RESOURCE_RESOLVER") public RegisteredService save(RegisteredService registeredService) { RegisteredService r = this.serviceRegistryDao.save(registeredService); this.services.TryAdd(r.getId(), r); return(r); }
public RegisteredService save(RegisteredService registeredService) { if (registeredService.getId() == -1) { ((AbstractRegisteredService)registeredService).setId(this.findHighestId() + 1); } this.registeredServices.Remove(registeredService); this.registeredServices.Add(registeredService); return registeredService; }
public RegisteredService save(RegisteredService registeredService) { if (registeredService.getId() == -1) { ((AbstractRegisteredService)registeredService).setId(this.findHighestId() + 1); } this.registeredServices.Remove(registeredService); this.registeredServices.Add(registeredService); return(registeredService); }
//public object clone() //{ // AbstractRegisteredService clone = newInstance(); // clone.copyFrom(this); // return clone; //} /** * Copies the properties of the source service into this instance. * * @param source Source service from which to copy properties. */ public void copyFrom(RegisteredService source) { this.setId(source.getId()); this.setAllowedAttributes(new List <string>(source.getAllowedAttributes())); this.setAllowedToProxy(source.isAllowedToProxy()); this.setDescription(source.getDescription()); this.setEnabled(source.isEnabled()); this.setName(source.getName()); this.setServiceId(source.getServiceId()); this.setSsoEnabled(source.isSsoEnabled()); this.setTheme(source.getTheme()); this.setAnonymousAccess(source.isAnonymousAccess()); this.setIgnoreAttributes(source.isIgnoreAttributes()); this.setEvaluationOrder(source.getEvaluationOrder()); this.setUsernameAttribute(source.getUsernameAttribute()); }
//public object clone() //{ // AbstractRegisteredService clone = newInstance(); // clone.copyFrom(this); // return clone; //} /** * Copies the properties of the source service into this instance. * * @param source Source service from which to copy properties. */ public void copyFrom(RegisteredService source) { this.setId(source.getId()); this.setAllowedAttributes(new List<string>(source.getAllowedAttributes())); this.setAllowedToProxy(source.isAllowedToProxy()); this.setDescription(source.getDescription()); this.setEnabled(source.isEnabled()); this.setName(source.getName()); this.setServiceId(source.getServiceId()); this.setSsoEnabled(source.isSsoEnabled()); this.setTheme(source.getTheme()); this.setAnonymousAccess(source.isAnonymousAccess()); this.setIgnoreAttributes(source.isIgnoreAttributes()); this.setEvaluationOrder(source.getEvaluationOrder()); this.setUsernameAttribute(source.getUsernameAttribute()); }