Beispiel #1
0
  private void changeCD(Object sender, EventArgs args) {
    VM entity = (VM) getItem().getEntity();
    ChangeCDModel model = (ChangeCDModel) sender;

    // TODO: Patch!
    String imageName = model.getTitle();
    if (ObjectUtils.objectsEqual(
        imageName, ConstantsManager.getInstance().getConstants().noCds())) {
      return;
    }

    Frontend.getInstance()
        .runAction(
            VdcActionType.ChangeDisk,
            new ChangeDiskCommandParameters(
                entity.getId(),
                ObjectUtils.objectsEqual(imageName, ConsoleModel.getEjectLabel())
                    ? ""
                    : imageName)); //$NON-NLS-1$
  }
  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof GlusterServerService)) {
      return false;
    }

    GlusterServerService other = (GlusterServerService) obj;
    if (!(ObjectUtils.objectsEqual(id, other.getId())
        && ObjectUtils.objectsEqual(serverId, other.getServerId())
        && ObjectUtils.objectsEqual(serviceId, other.getServiceId())
        && status == other.getStatus()
        && ObjectUtils.objectsEqual(message, other.getMessage())
        && ObjectUtils.objectsEqual(pid, other.getPid())
        && serviceType == other.getServiceType()
        && ObjectUtils.objectsEqual(hostName, other.getHostName())
        && ObjectUtils.objectsEqual(port, other.getPort()))) {
      return false;
    }
    return true;
  }
 public void setMountOptions(String mountOptions) {
   if (!ObjectUtils.objectsEqual(this.mountOptions, mountOptions)) {
     this.mountOptions = mountOptions;
     onPropertyChanged(new PropertyChangedEventArgs("MountOptions")); // $NON-NLS-1$
   }
 }
 public void setVfsType(String vfsType) {
   if (!ObjectUtils.objectsEqual(this.vfsType, vfsType)) {
     this.vfsType = vfsType;
     onPropertyChanged(new PropertyChangedEventArgs("VfsType")); // $NON-NLS-1$
   }
 }
 public void setPath(String value) {
   if (!ObjectUtils.objectsEqual(path, value)) {
     path = value;
     onPropertyChanged(new PropertyChangedEventArgs("Path")); // $NON-NLS-1$
   }
 }