@Override public int hashCode() { int hash = 7; hash = 31 * hash + Objects.hashCode(id); hash = 31 * hash + Objects.hashCode(getNamespace()); hash = 31 * hash + Objects.hashCode(config); hash = 31 * hash + getAttributes().hashCode(); hash = 31 * hash + Boolean.hashCode(isTemporary); hash = 31 * hash + Objects.hashCode(status); hash = 31 * hash + Objects.hashCode(runtime); return hash; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof WorkspaceImpl)) return false; final WorkspaceImpl other = (WorkspaceImpl) obj; return Objects.equals(id, other.id) && Objects.equals(getNamespace(), other.getNamespace()) && Objects.equals(config, other.config) && getAttributes().equals(other.getAttributes()) && isTemporary == other.isTemporary && Objects.equals(status, other.status) && Objects.equals(runtime, other.runtime); }
protected void render() { if (appContext.getProjects() != null && appContext.getProjects().length == 0) { renderNoProjects(); return; } if (appContext.getWorkspace().getAttributes().containsKey("factoryId")) { renderFactoryActions(); return; } renderNoFiles(); }
String cause = workspace.getAttributes().get(ERROR_MESSAGE_ATTRIBUTE_NAME); eventBus.fireEvent( new WorkspaceStoppedEvent(true, firstNonNull(cause, "Reason is unknown.")));
public WorkspaceImpl(WorkspaceImpl workspace) { this( workspace.getId(), workspace.getNamespace(), workspace.getConfig(), workspace.getRuntime(), workspace.getAttributes(), workspace.isTemporary(), workspace.getStatus(), workspace.getLinks(), workspace.getRuntime() != null ? workspace.getRuntime().getMachineToken() : null); }