2 * Copyright 2015 Samsung Electronics All Rights Reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.oic.simulator.server;
19 import java.util.Vector;
21 import org.oic.simulator.InvalidArgsException;
22 import org.oic.simulator.SimulatorException;
24 public final class SimulatorCollectionResource extends SimulatorResource {
26 private SimulatorCollectionResource(long nativeHandle) {
27 mNativeHandle = nativeHandle;
31 * API to add child resource to collection.
34 * Child resource to be added to collection.
36 * @throws InvalidArgsException
37 * This exception will be thrown on invalid input.
38 * @throws SimulatorException
39 * This exception will be thrown on occurrence of error in
42 public native void addChildResource(SimulatorResource resource)
43 throws InvalidArgsException, SimulatorException;
46 * API to remove child resource from collection.
49 * Child resource to be removed from collection.
51 * @throws InvalidArgsException
52 * This exception will be thrown on invalid input.
53 * @throws SimulatorException
54 * This exception will be thrown on occurrence of error in
57 public native void removeChildResource(SimulatorResource resource)
58 throws InvalidArgsException, SimulatorException;
61 * API to remove child resource from collection.
64 * URI of child resource to be removed from collection.
66 * @throws InvalidArgsException
67 * This exception will be thrown on invalid input.
68 * @throws SimulatorException
69 * This exception will be thrown on occurrence of error in
72 public native void removeChildResourceByUri(String uri)
73 throws InvalidArgsException, SimulatorException;
76 * API to get list of child resources.
78 * @return Vector of child resources {@link SimulatorResource}.
80 * @throws SimulatorException
81 * This exception will be thrown on occurrence of error in
84 public native Vector<SimulatorResource> getChildResource()
85 throws SimulatorException;