1717package org .energyos .espi .common .service ;
1818
1919import java .util .List ;
20+ import java .util .Map ;
2021import java .util .UUID ;
2122
2223import org .energyos .espi .common .domain .IdentifiedObject ;
@@ -34,7 +35,15 @@ public interface ResourceService {
3435 void persist (IdentifiedObject resource );
3536
3637 void flush ();
37-
38+
39+ public void setConfigurations (Map <String , String > params );
40+
41+ public void setConfiguration (String key , String value );
42+
43+ public Map <String , String > getConfigurations ();
44+
45+ public String getConfiguration (String key );
46+
3847 List <IdentifiedObject > findByAllParentsHref (String relatedHref ,
3948 Linkable linkable );
4049
@@ -72,41 +81,152 @@ List<IdentifiedObject> findByAllParentsHref(String relatedHref,
7281 */
7382 <T extends IdentifiedObject > List <Long > findAllIdsByUsagePointId (Long usagePointId , Class <T > clazz );
7483
84+ /**
85+ * One of the XPath navigators. Class1/mm/Class2/nn/Class3/pp where the input parameters
86+ * provide the obvious mappings to resources.
87+ *
88+ * @param clazz
89+ * @return
90+ */
7591 <T extends IdentifiedObject > List <Long > findAllIdsByXPath (Class <T > clazz );
7692
93+ /**
94+ * One of the XPath navigators. Class1/mm/Class2/nn/Class3/pp where the input parameters
95+ * provide the obvious mappings to resources.
96+ *
97+ * @param id1 (is either a retail customerId or a subscriptionId or ... any resourceId
98+ * @param clazz
99+ * @return
100+ */
77101 <T extends IdentifiedObject > List <Long > findAllIdsByXPath (Long id1 , Class <T > clazz );
78102
103+ /**
104+ * One of the XPath navigators. Class1/mm/Class2/nn/Class3/pp where the input parameters
105+ * provide the obvious mappings to resources.
106+ *
107+ * @param id1
108+ * @param id2
109+ * @param clazz
110+ * @return a List of Long's == resourceIds of the resultant search
111+ */
79112 <T extends IdentifiedObject > List <Long > findAllIdsByXPath (Long id1 , Long id2 , Class <T > clazz );
80113
114+ /**
115+ * One of the XPath navigators. Class1/mm/Class2/nn/Class3/pp where the input parameters
116+ * provide the obvious mappings to resources.
117+ *
118+ * @param id1
119+ * @param id2
120+ * @param id3
121+ * @param clazz
122+ * @return a List of Long's == resourceIds of the resultant search
123+ */
81124 <T extends IdentifiedObject > List <Long > findAllIdsByXPath (Long id1 , Long id2 , Long id3 , Class <T > clazz );
82125
126+ /**
127+ * @param id1
128+ * @param clazz
129+ * @return a List of Long's == resourceIds of the resultant search
130+ */
83131 <T extends IdentifiedObject > Long findIdByXPath (Long id1 , Class <T > clazz );
84132
133+ /**
134+ * @param id1
135+ * @param id2
136+ * @param clazz
137+ * @return a List of Long's == resourceIds of the resultant search
138+ */
85139 <T extends IdentifiedObject > Long findIdByXPath (Long id1 , Long id2 , Class <T > clazz );
86140
141+ /**
142+ * @param id1
143+ * @param id2
144+ * @param id3
145+ * @param clazz
146+ * @return a List of Long's == resourceIds of the resultant search
147+ */
87148 <T extends IdentifiedObject > Long findIdByXPath (Long id1 , Long id2 , Long id3 , Class <T > clazz );
88149
150+ /**
151+ * @param id1
152+ * @param id2
153+ * @param id3
154+ * @param id4
155+ * @param clazz
156+ * @return a List of Long's == resourceIds of the resultant search
157+ */
89158 <T extends IdentifiedObject > Long findIdByXPath (Long id1 , Long id2 , Long id3 , Long id4 , Class <T > clazz );
90159
160+ /**
161+ * @param clazz
162+ * @return an {@link EntryTypeIterator} that may be used to export the associated resource tree
163+ *
164+ */
91165 <T extends IdentifiedObject > EntryTypeIterator findEntryTypeIterator (Class <T > clazz );
92166
167+ /**
168+ * @param ids
169+ * @param clazz
170+ * @return
171+ */
93172 <T extends IdentifiedObject > EntryTypeIterator findEntryTypeIterator (List <Long > ids , Class <T > clazz );
94173
174+ /**
175+ * @param id1
176+ * @param clazz
177+ * @return
178+ */
95179 <T extends IdentifiedObject > EntryType findEntryType (long id1 , Class <T > clazz );
96180
97181 // currently used only finding the Authorization associated with a given resource URI
182+ /**
183+ * @param uri
184+ * @param clazz
185+ * @return
186+ */
98187 <T extends IdentifiedObject > T findByResourceUri (String uri , Class <T > clazz );
99188
100189 // a collection of interfaces that delete resources (by both XPATH and ROOT form)
101190 //
191+ /**
192+ * @param id
193+ * @param clazz
194+ */
102195 <T extends IdentifiedObject > void deleteById (Long id , Class <T > clazz );
103196
197+ /**
198+ * @param id1
199+ * @param id2
200+ * @param clazz
201+ */
202+ /**
203+ * @param id1
204+ * @param id2
205+ * @param clazz
206+ */
104207 <T extends IdentifiedObject > void deleteByXPathId (Long id1 , Long id2 ,Class <T > clazz );
105208
209+ /**
210+ * @param id1
211+ * @param id2
212+ * @param id3
213+ * @param clazz
214+ */
106215 <T extends IdentifiedObject > void deleteByXPathId (Long id1 , Long id2 , Long id3 , Class <T > clazz );
107216
217+ /**
218+ * @param id1
219+ * @param id2
220+ * @param id3
221+ * @param id4
222+ * @param clazz
223+ */
108224 <T extends IdentifiedObject > void deleteByXPathId (Long id1 , Long id2 , Long id3 , Long id4 , Class <T > clazz );
109225
226+ /**
227+ * @param existingResource
228+ * @return
229+ */
110230 <T extends IdentifiedObject > T merge (IdentifiedObject existingResource );
111231
112232}
0 commit comments