/** * personium.io * Copyright 2014 FUJITSU LIMITED * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.fujitsu.dc.core.model.progress; import java.io.Serializable; /** * 非同期処理状況オブジェクト. */ public class Progress implements Serializable { private static final long serialVersionUID = 1L; String key; // キー String value; // JSON文字列 Long createdAt; // 作成時刻 /** * @return the key */ public String getKey() { return key; } /** * @return the value */ public String getValue() { return value; } /** * @param value the value to set */ public void setValue(String value) { this.value = value; } /** * コンストラクタ. * @param key 非同期処理状況のキー * @param value 非同期処理状況の値(JSON文字列) */ public Progress(String key, String value) { this.key = key; this.value = value; this.createdAt = Long.valueOf(System.currentTimeMillis()); } /** * 非同期処理状況を削除します. */ public void delete() { ProgressManager.deleteProgress(this.key); } }