1 package fr.in2p3.jsaga.impl.resource.task;
2
3 import fr.in2p3.jsaga.impl.attributes.AbstractAsyncAttributesImpl;
4 import fr.in2p3.jsaga.impl.attributes.ScalarAttributeImpl;
5 import fr.in2p3.jsaga.impl.attributes.VectorAttributeImpl;
6 import fr.in2p3.jsaga.impl.monitoring.AbstractMonitorableImpl;
7 import org.ogf.saga.attributes.AsyncAttributes;
8 import org.ogf.saga.attributes.Attributes;
9 import org.ogf.saga.error.*;
10 import org.ogf.saga.session.Session;
11 import org.ogf.saga.task.Task;
12 import org.ogf.saga.task.TaskMode;
13
14
15
16
17
18
19
20
21 public class AbstractMonitorableWithAsyncAttributes<A extends Attributes> extends AbstractMonitorableImpl implements AsyncAttributes<A> {
22 private AbstractAsyncAttributesImpl<A> m_attributes;
23
24
25 public AbstractMonitorableWithAsyncAttributes(Session session) {
26 super(session);
27 m_attributes = new AbstractAsyncAttributesImpl<A>(m_session, (A) this){};
28 }
29
30 public void setAttribute(String key, String value) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, BadParameterException, DoesNotExistException, TimeoutException, NoSuccessException {
31 m_attributes.setAttribute(key, value);
32 }
33
34 public String getAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, DoesNotExistException, TimeoutException, NoSuccessException {
35 return m_attributes.getAttribute(key);
36 }
37
38 public void setVectorAttribute(String key, String[] values) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, BadParameterException, DoesNotExistException, TimeoutException, NoSuccessException {
39 m_attributes.setVectorAttribute(key, values);
40 }
41
42 public String[] getVectorAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, IncorrectStateException, DoesNotExistException, TimeoutException, NoSuccessException {
43 return m_attributes.getVectorAttribute(key);
44 }
45
46 public void removeAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException {
47 m_attributes.removeAttribute(key);
48 }
49
50 public String[] listAttributes() throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, TimeoutException, NoSuccessException {
51 return m_attributes.listAttributes();
52 }
53
54 public String[] findAttributes(String... patterns) throws NotImplementedException, BadParameterException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, TimeoutException, NoSuccessException {
55 return m_attributes.findAttributes(patterns);
56 }
57
58 public boolean existsAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, TimeoutException, NoSuccessException {
59 return m_attributes.existsAttribute(key);
60 }
61
62 public boolean isReadOnlyAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException {
63 return m_attributes.isReadOnlyAttribute(key);
64 }
65
66 public boolean isWritableAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException {
67 return m_attributes.isWritableAttribute(key);
68 }
69
70 public boolean isRemovableAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException {
71 return m_attributes.isRemovableAttribute(key);
72 }
73
74 public boolean isVectorAttribute(String key) throws NotImplementedException, AuthenticationFailedException, AuthorizationFailedException, PermissionDeniedException, DoesNotExistException, TimeoutException, NoSuccessException {
75 return m_attributes.isVectorAttribute(key);
76 }
77
78 public Task<A, Void> setAttribute(TaskMode mode, String key, String value) throws NotImplementedException {
79 return m_attributes.setAttribute(mode, key, value);
80 }
81
82 public Task<A, String> getAttribute(TaskMode mode, String key) throws NotImplementedException {
83 return m_attributes.getAttribute(mode, key);
84 }
85
86 public Task<A, Void> setVectorAttribute(TaskMode mode, String key, String[] values) throws NotImplementedException {
87 return m_attributes.setVectorAttribute(mode, key, values);
88 }
89
90 public Task<A, String[]> getVectorAttribute(TaskMode mode, String key) throws NotImplementedException {
91 return m_attributes.getVectorAttribute(mode, key);
92 }
93
94 public Task<A, Void> removeAttribute(TaskMode mode, String key) throws NotImplementedException {
95 return m_attributes.removeAttribute(mode, key);
96 }
97
98 public Task<A, String[]> listAttributes(TaskMode mode) throws NotImplementedException {
99 return m_attributes.listAttributes(mode);
100 }
101
102 public Task<A, String[]> findAttributes(TaskMode mode, String... patterns) throws NotImplementedException {
103 return m_attributes.findAttributes(mode, patterns);
104 }
105
106 public Task<A, Boolean> existsAttribute(TaskMode mode, String key) throws NotImplementedException {
107 return m_attributes.existsAttribute(mode, key);
108 }
109
110 public Task<A, Boolean> isReadOnlyAttribute(TaskMode mode, String key) throws NotImplementedException {
111 return m_attributes.isReadOnlyAttribute(mode, key);
112 }
113
114 public Task<A, Boolean> isWritableAttribute(TaskMode mode, String key) throws NotImplementedException {
115 return m_attributes.isWritableAttribute(mode, key);
116 }
117
118 public Task<A, Boolean> isRemovableAttribute(TaskMode mode, String key) throws NotImplementedException {
119 return m_attributes.isRemovableAttribute(mode, key);
120 }
121
122 public Task<A, Boolean> isVectorAttribute(TaskMode mode, String key) throws NotImplementedException {
123 return m_attributes.isVectorAttribute(mode, key);
124 }
125
126
127
128 public ScalarAttributeImpl _addAttribute(ScalarAttributeImpl scalarAttribute) {
129 return m_attributes._addAttribute(scalarAttribute);
130 }
131
132 public VectorAttributeImpl _addVectorAttribute(VectorAttributeImpl vectorAttribute) {
133 return m_attributes._addVectorAttribute(vectorAttribute);
134 }
135 }