Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / ServiceProviderPlugin / src / oic / simulator / serviceprovider / model / SingleResource.java
1 /*
2  * Copyright 2015 Samsung Electronics All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package oic.simulator.serviceprovider.model;
18
19 import org.oic.simulator.server.SimulatorResource.AutoUpdateType;
20
21 /**
22  * This class represents a simulated resource. It maintains all the necessary
23  * information about the resource.
24  */
25 public class SingleResource extends Resource {
26     private boolean        getAllowed;
27
28     private boolean        putAllowed;
29
30     private boolean        postAllowed;
31
32     private int            automationId;
33
34     private boolean        resourceAutomationInProgress;
35
36     private boolean        attributeAutomationInProgress;
37
38     private int            automationUpdateInterval;
39
40     private AutoUpdateType automationType;
41
42     public boolean isGetAllowed() {
43         return getAllowed;
44     }
45
46     public void setGetAllowed(boolean getAllowed) {
47         this.getAllowed = getAllowed;
48     }
49
50     public boolean isPutAllowed() {
51         return putAllowed;
52     }
53
54     public void setPutAllowed(boolean putAllowed) {
55         this.putAllowed = putAllowed;
56     }
57
58     public boolean isPostAllowed() {
59         return postAllowed;
60     }
61
62     public void setPostAllowed(boolean postAllowed) {
63         this.postAllowed = postAllowed;
64     }
65
66     public int getAutomationUpdateInterval() {
67         return automationUpdateInterval;
68     }
69
70     public void setAutomationUpdateInterval(int automationUpdateInterval) {
71         this.automationUpdateInterval = automationUpdateInterval;
72     }
73
74     public AutoUpdateType getAutomationType() {
75         return automationType;
76     }
77
78     public void setAutomationType(AutoUpdateType automationType) {
79         this.automationType = automationType;
80     }
81
82     public int getAutomationId() {
83         return automationId;
84     }
85
86     public void setAutomationId(int automationId) {
87         this.automationId = automationId;
88     }
89
90     public boolean isResourceAutomationInProgress() {
91         return resourceAutomationInProgress;
92     }
93
94     public void setResourceAutomationInProgress(
95             boolean resourceAutomationInProgress) {
96         this.resourceAutomationInProgress = resourceAutomationInProgress;
97     }
98
99     public boolean isAttributeAutomationInProgress() {
100         return attributeAutomationInProgress;
101     }
102
103     public void setAttributeAutomationInProgress(
104             boolean attributeAutomationInProgress) {
105         this.attributeAutomationInProgress = attributeAutomationInProgress;
106     }
107 }