@@ -120,6 +120,18 @@ ConductorApplication getApplication(String applicationId) {
120120 return response .getData ();
121121 }
122122
123+ ConductorApplication getApplicationByAccessKeyId (String accessKeyId ) {
124+ ConductorClientRequest request = ConductorClientRequest .builder ()
125+ .method (Method .GET )
126+ .path ("/applications/key/{accessKeyId}" )
127+ .addPathParam ("accessKeyId" , accessKeyId )
128+ .build ();
129+ ConductorClientResponse <ConductorApplication > response = client .execute (request , new TypeReference <>() {
130+ });
131+
132+ return response .getData ();
133+ }
134+
123135 List <ConductorApplication > listApplications () {
124136 ConductorClientRequest request = ConductorClientRequest .builder ()
125137 .method (Method .GET )
@@ -156,10 +168,12 @@ AccessKeyResponse toggleAccessKeyStatus(String applicationId, String keyId) {
156168 }
157169
158170 void putTags (List <TagObject > body , String applicationId ) {
159- Objects .requireNonNull (body , "List<TagObject> cannot be null" );
171+ if (body == null ) {
172+ throw new IllegalArgumentException ("tags must not be null" );
173+ }
160174 ConductorClientRequest request = ConductorClientRequest .builder ()
161175 .method (Method .PUT )
162- .path ("/applications/{id }/tags" )
176+ .path ("/applications/{applicationId }/tags" )
163177 .addPathParam ("applicationId" , applicationId )
164178 .body (body )
165179 .build ();
@@ -170,7 +184,7 @@ void putTags(List<TagObject> body, String applicationId) {
170184 List <TagObject > getTags (String applicationId ) {
171185 ConductorClientRequest request = ConductorClientRequest .builder ()
172186 .method (Method .GET )
173- .path ("/applications/{id }/tags" )
187+ .path ("/applications/{applicationId }/tags" )
174188 .addPathParam ("applicationId" , applicationId )
175189 .build ();
176190
@@ -181,10 +195,12 @@ List<TagObject> getTags(String applicationId) {
181195 }
182196
183197 void deleteTags (List <TagObject > body , String applicationId ) {
184- Objects .requireNonNull (body , "List<TagObject> cannot be null" );
198+ if (body == null ) {
199+ throw new IllegalArgumentException ("tags must not be null" );
200+ }
185201 ConductorClientRequest request = ConductorClientRequest .builder ()
186202 .method (Method .DELETE )
187- .path ("/applications/{id }/tags" )
203+ .path ("/applications/{applicationId }/tags" )
188204 .addPathParam ("applicationId" , applicationId )
189205 .body (body )
190206 .build ();
0 commit comments