예제 #1
0
  public String getLabelsString() {
    final String labels;

    if (this.labels != null && this.labels.length > 0) {
      labels = LabelCmdUtils.toJsonArray(this.labels).toString();
    } else {
      labels = "";
    }

    return labels;
  }
예제 #2
0
  public void setLabelsByString(String labels) {
    if (TextUtils.isEmpty(labels)) {
      this.labels = null;
      return;
    }

    UserLabel[] labelArray = null;

    try {
      labelArray = LabelCmdUtils.toUserLabelArray(new JSONArray(labels));
    } catch (JSONException e) {
      L.w(TAG, e);
    } finally {
      this.labels = labelArray;
    }
  }