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