- Timestamp:
- May 1, 2011, 12:44:59 PM (13 years ago)
- Location:
- extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/transverse
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/transverse/enumeration/MethodsEnum.java
r10714 r10716 28 28 "pwg.images.setInfo"), SEARCH("pwg.images.search"), SET_PRIVACY_LEVEL("pwg.images.setPrivacyLevel"), ADD_SIMPLE( 29 29 "pwg.images.addSimple"), ADD_IMAGE("pwg.images.add"), ADD_CHUNK("pwg.images.addChunk"), DELETE_CATEGORY( 30 "pwg.categories.delete"), SESSION_STATUS("pwg.session.getStatus");30 "pwg.categories.delete"), DELETE_IMAGE("pwg.images.delete"), SESSION_STATUS("pwg.session.getStatus"); 31 31 32 32 protected String label; -
extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/transverse/session/SessionManager.java
r10698 r10716 127 127 */ 128 128 public InputStream getInputStreamFromUrl(String url) throws Exception; 129 130 /** 131 * This method allows to get pwg_token. This string is necessary 132 * to call web service functions like pwg.images.delete and pwg.categories.delete 133 * @return pwg_token 134 */ 135 public String getPwgToken() throws JiwigoException; 136 129 137 } -
extensions/jiwigo-ws-api/src/main/java/fr/mael/jiwigo/transverse/session/impl/SessionManagerImpl.java
r10714 r10716 266 266 267 267 /** 268 * @see fr.mael.jiwigo.transverse.session.SessionManager#getPwgToken() 269 */ 270 public String getPwgToken() throws JiwigoException { 271 Document docStatus = executeReturnDocument(MethodsEnum.SESSION_STATUS.getLabel()); 272 String pwgToken = Tools.getStringValueDom(docStatus.getDocumentElement(), "pwg_token"); 273 if ("".equals(pwgToken)) { 274 throw new JiwigoException("Error getting pwg_token. Returned document was : " 275 + Tools.documentToString(docStatus)); 276 } 277 return pwgToken; 278 } 279 280 /** 268 281 * @return the login 269 282 */
Note: See TracChangeset
for help on using the changeset viewer.