Ejemplo n.º 1
0
  public Object get(String attrName) {
    int pos = attrName.indexOf('.');
    String attribute = attrName;

    if (pos > 0) {
      attribute = attrName.substring(0, pos);
    }

    if (PROPERTY_FILESERVER.equalsIgnoreCase(attribute)) {
      return getFileServer();
    }

    if (PROPERTY_IDMAP.equalsIgnoreCase(attribute)) {
      return getIdMap();
    }

    if (PROPERTY_FILENAME.equalsIgnoreCase(attribute)) {
      return getFileName();
    }

    if (PROPERTY_TASKNO.equalsIgnoreCase(attribute)) {
      return getTaskNo();
    }

    return null;
  }
Ejemplo n.º 2
0
  public boolean set(String attrName, Object value) {
    if (PROPERTY_FILESERVER.equalsIgnoreCase(attrName)) {
      setFileServer((org.sdmlib.models.taskflows.PeerProxy) value);
      return true;
    }

    if (PROPERTY_IDMAP.equalsIgnoreCase(attrName)) {
      setIdMap((SDMLibJsonIdMap) value);
      return true;
    }

    if (PROPERTY_FILENAME.equalsIgnoreCase(attrName)) {
      setFileName((String) value);
      return true;
    }

    if (PROPERTY_TASKNO.equalsIgnoreCase(attrName)) {
      setTaskNo(Integer.parseInt(value.toString()));
      return true;
    }

    return false;
  }