public RichDestination(Destination destination, Facility facility, Service service) { super(destination.getId(), destination.getDestination(), destination.getType(), destination.getCreatedAt(), destination.getCreatedBy(), destination.getModifiedAt(), destination.getModifiedBy(), destination.getCreatedByUid(), destination.getModifiedByUid()); setPropagationType(destination.getPropagationType()); this.service = service; this.facility = facility; }
private static Destination createDestination(Map<String, String> beanAttr) { if(beanAttr==null) return null; Destination destination = new Destination(); destination.setId(Integer.valueOf(beanAttr.get("id"))); destination.setDestination(BeansUtils.eraseEscaping(beanAttr.get("destination"))); destination.setType(BeansUtils.eraseEscaping(beanAttr.get("type"))); destination.setPropagationType(BeansUtils.eraseEscaping(beanAttr.get("propagationtype"))); return destination; }
public DestinationExistsException(Destination destination) { super(destination.toString()); this.destination = destination; }
@Override public int compareTo(PerunBean perunBean) { if(perunBean == null) throw new NullPointerException("PerunBean to compare with is null."); if(perunBean instanceof Destination) { Destination destination = (Destination) perunBean; if (this.getDestination() == null && destination.getDestination() != null) return -1; if (destination.getDestination() == null && this.getDestination() != null) return 1; if (this.getDestination() == null && destination.getDestination() == null) return 0; return this.getDestination().compareToIgnoreCase(destination.getDestination()); } else { return (this.getId() - perunBean.getId()); } } }
@Override public String serializeToString() { StringBuilder str = new StringBuilder(); return str.append(this.getClass().getSimpleName()).append(":[").append( "id=<").append(getId()).append(">").append( ", destination=<").append(getDestination() == null ? "\\0" : BeansUtils.createEscaping(getDestination())).append(">").append( ", type=<").append(getType() == null ? "\\0" : BeansUtils.createEscaping(getType())).append(">").append( ", propagationtype=<").append(getPropagationType() == null ? "\\0" : BeansUtils.createEscaping(getPropagationType())).append(">").append( ']').toString(); }
@Override public String toString() { StringBuilder str = new StringBuilder(); return str.append(getClass().getSimpleName()).append(":[" ).append("id='").append(getId() ).append("', destination='").append(super.getDestination() ).append("', type='").append(super.getType() ).append("', facility='").append(getFacility() ).append("', service='").append(getService() ).append("']").toString(); } }
if (sendTask.getDestination().getPropagationType().equals(Destination.PROPAGATIONTYPE_DUMMY)) { sendTask.getTask().getId(), sendTask.getDestination().getDestination()); sendTask.getDestination().getDestination()); sendTask.getDestination().getDestination(), sendTask.getDestination().getType() );
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + getId(); result = prime * result + ((destination == null) ? 0 : destination.hashCode()); return result; }
result.add(resource); Destination destination = new Destination(); destination.setId(0); destination.setType("CLUSTER"); result.add(destination);
while (iter.hasNext()) { Destination dest = iter.next(); if (serviceDenialDao.isServiceBlockedOnDestination(service.getId(), dest.getId())) { iter.remove(); log.debug("[{}] Removed blocked destination: {}", task.getId(), dest.toString()); if (destinations != null) { for (Destination destination : destinations) { destinations_s.append(destination.serializeToString()).append(", ");
@Override public String serializeToString() { StringBuilder str = new StringBuilder(); return str.append(this.getClass().getSimpleName()).append(":[").append( "id=<").append(getId()).append(">").append( ", destination=<").append(super.getDestination() == null ? "\\0" : BeansUtils.createEscaping(super.getDestination())).append(">").append( ", type=<").append(super.getType() == null ? "\\0" : BeansUtils.createEscaping(super.getType())).append(">").append( ", facility=<").append(getFacility() == null ? "\\0" : getFacility().serializeToString()).append(">").append( ", service=<").append(getService() == null ? "\\0" : getService().serializeToString()).append(">").append( ']').toString(); }
public String toString() { StringBuilder str = new StringBuilder(); return str.append(getClass().getSimpleName()).append(":[" ).append("id='").append(getId() ).append("', destination='").append(destination ).append("', type='").append(type ).append("', propagationtype='").append(propagationType ).append("']").toString(); }
public static Destination addDestination(RpcCaller rpcCaller, Service service, Facility facility, Destination destination) throws PrivilegeException, InternalErrorException, ServiceNotExistsException, FacilityNotExistsException, DestinationAlreadyAssignedException { Map<String, Object> params = new HashMap<String, Object>(); params.put("service", service.getId()); params.put("facility", facility.getId()); params.put("destination", destination.getDestination()); params.put("type", destination.getType()); try { return rpcCaller.call("servicesManager", "addDestination", params).read(Destination.class); } catch (DestinationAlreadyAssignedException e) { throw e; } catch (FacilityNotExistsException e) { throw e; } catch (ServiceNotExistsException e) { throw e; } catch (PrivilegeException e) { throw e; } catch (InternalErrorException e) { throw e; } catch (PerunException e) { throw new ConsistencyErrorException(e); } }
public DestinationAlreadyAssignedException(Destination destination) { super(destination.toString()); this.destination = destination; }
while (iter.hasNext()) { Destination dest = iter.next(); if (serviceDenialDao.isServiceBlockedOnDestination(service.getId(), dest.getId())) { iter.remove();
public DestinationAlreadyRemovedException(Destination destination) { super(destination.toString()); this.destination = destination; }
try { taskResult = schedulingPool.createTaskResult(task.getId(), sendTask.getDestination().getId(), sendTask.getStderr(), sendTask.getStdout(), sendTask.getReturnCode(), task.getService());
public ServiceAlreadyBannedException(Service service, Destination destination) { this(service.toString() + " is already banned on " + destination.toString()); this.service = service; this.destination = destination; }
jmsQueueManager.reportTaskResult(schedulingPool.createTaskResult(task.getId(), destination.getId(), stderr, stdout, returnCode, service));