- Timestamp:
- 02/23/15 16:28:19 (9 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/AnnotationResource.java
r6009 r6024 72 72 /** 73 73 * 74 * @param httpServletResponse a {@link HttpServletResponse} object, to be set to "this" object and to be used to send error messages.74 * @param httpServletResponse a {@link HttpServletResponse} object, setting us used in unit tests. 75 75 */ 76 76 public void setHttpServletResponse(HttpServletResponse httpServletResponse) { … … 80 80 /** 81 81 * 82 * @param httpServletRequest a {@link HttpServletRequest} object, to be set to "this" object and to beused in the unit tests.82 * @param httpServletRequest a {@link HttpServletRequest} object, setting is used in the unit tests. 83 83 */ 84 84 public void setHttpServletRequest(HttpServletRequest httpServletRequest) { -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/PrincipalResource.java
r5850 r6024 63 63 int shaStrength = 512; 64 64 65 66 /** 67 * 68 * @param request a {@link HttpServletRequest} object; set object is used in unit tests. 69 */ 65 70 public void setHttpRequest(HttpServletRequest request) { 66 71 this.httpServletRequest = request; … … 70 75 } 71 76 77 /** 78 * 79 * @param externalIdentifier the external UUID of a principal. 80 * @return the {@link Principal} element representing the principal object with the "externalIdentifier". 81 * @throws IOException is sending the error fails. 82 */ 72 83 @GET 73 84 @Produces(MediaType.TEXT_XML) … … 98 109 } 99 110 100 ///////////////////////////////// 111 /** 112 * 113 * @return a message containing the fill name and the e-mail of the admin. 114 * @throws IOException if sending the error in the call of "this.getPrincipalID()". 115 */ 101 116 @GET 102 117 @Produces(MediaType.TEXT_PLAIN) … … 111 126 } 112 127 113 ///////////////////////////////////////// 128 /** 129 * 130 * @param email a string representing the e-mail of a principal. 131 * @return a {@link Principal} representing the principal with the "email", 132 * if such a principal is found; otherwise "SC_NOT_FOUND" error is sent. 133 * @throws IOException if sending the error fails. 134 */ 114 135 @GET 115 136 @Produces(MediaType.TEXT_XML) … … 139 160 } 140 161 141 //////////////////////////////////////// 162 163 /** 164 * 165 * @param externalIdentifier the external UUID of a principal. 166 * @return a {@link CurrentPrincipalInfo} element containing "true" if the principal 167 * with externalIdentifier is logged-in in this session; 168 * withe the current implementation does not make that much sense for me, 169 * because the logged-in user knows his/her externalIDdentifier and knows that the other UUIDs 170 * will be "not logged in", and therefore "false" is expected, 171 * @throws IOException if sending the error fails. 172 */ 142 173 @GET 143 174 @Produces(MediaType.TEXT_XML) … … 223 254 // 224 255 // } 225 ///////////////////////////////////// 256 /** 257 * 258 * @param name the name of the principal to be registered as a basic-authentication user. 259 * @param remoteId the remote id of the principal to be registered. 260 * @param password the password selected by the principal to be registered. 261 * @param email an email of the principal to be registered. 262 * @return a @Link Principal} element representing the just registered principal. 263 * @throws IOException if sending the error fails. 264 */ 226 265 @POST 227 266 @Consumes(MediaType.APPLICATION_FORM_URLENCODED) … … 267 306 } 268 307 269 /////////////////////////////////////////////// 308 /** 309 * 310 * @param name the name of the principal to be registered 311 * @param remoteId the remote shibboleth id. 312 * @param email the email. 313 * @return a @Link Principal} element representing the just registered principal. 314 * @throws IOException if sending the error fails. 315 */ 270 316 @POST 271 317 @Consumes(MediaType.APPLICATION_FORM_URLENCODED) … … 304 350 } 305 351 306 /////////////////////////////////////////////////// 352 /** 353 * It is of a good convenience method limiting proliferation of user profiles, however 354 * the method is currently not used till security issues will be discussed with the LAT 355 * system administrators. 356 * @param remoteId a shibboleth remote id, which will be set as a basic-authentication remote id as well. 357 * @param password a shibboleth password which will be set as a basic-authentication password. 358 * @return a message about amount of records; which must be 2 if everything goes well: 359 * 1 record for the principal, another for the authorities table 360 * @throws IOException if sending the error fails. 361 */ 307 362 @POST 308 363 @Consumes(MediaType.APPLICATION_FORM_URLENCODED) … … 320 375 } 321 376 } 322 377 378 /** 379 * 380 * @param principal a {@link Principal} object representing new information (name, e-mail) about the principal 381 * with the eternal UUID given in the object, 382 * @return a @Link Principal} element representing the just updated principal. 383 * @throws IOException if sending the error message fails. 384 */ 323 385 @PUT 324 386 @Consumes(MediaType.APPLICATION_XML) … … 351 413 ///////////////////////////////// 352 414 353 // logged in user can update his/her account 354 // or account can be updated by the admin in a separate request, see above 415 /** 416 * 417 * @param name a new full name. 418 * @param email a new email 419 * @return a @Link Principal} element representing the just updated principal. 420 * @throws IOException if sending the error fails. 421 * @throws NotInDataBaseException if the in-logged principal is not found in the database 422 * or updated fails. 423 */ 355 424 @POST 356 425 @Consumes(MediaType.APPLICATION_FORM_URLENCODED) … … 389 458 } 390 459 391 ////////////////////////////////////// 460 /** 461 * 462 * @param externalId the external UUID of a principal. 463 * @param accountType an account type: "user", "developer", "admin". 464 * @return a message telling if and how the account is updated; this action can be performed only by admin. 465 * @throws IOException 466 */ 392 467 @PUT 393 468 @Produces(MediaType.TEXT_PLAIN) … … 421 496 } 422 497 498 /** 499 * 500 * @param externalIdentifier the external UUID of a principal to be deleted. 501 * @return a message informing if deletion has been successful; see "error" messages if deletion 502 * has not taken place. 503 * @throws IOException if sending error messages fails. 504 */ 423 505 @DELETE 424 506 @Path("{principalId}")
Note: See TracChangeset
for help on using the changeset viewer.