r1008 - in trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web: . grid pages pages/security services
Author: glandais Date: 2008-02-15 17:03:52 +0000 (Fri, 15 Feb 2008) New Revision: 1008 Removed: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/SimExplorerWebException.java Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementMetadata.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPage.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteService.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteStorageService.java trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java Log: Web exception handling Deleted: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/SimExplorerWebException.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/SimExplorerWebException.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/SimExplorerWebException.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -1,67 +0,0 @@ -/* -* ##% Copyright (C) 2008 Code Lutin, Gabriel Landais -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* ##% */ -package fr.cemagref.simexplorer.is.ui.web; - -/** - * The Class SimExplorerWebException. - */ -public class SimExplorerWebException extends RuntimeException { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 4644835311729988659L; - - /** - * Instantiates a new sim explorer web exception. - */ - public SimExplorerWebException() { - super(); - } - - /** - * Instantiates a new sim explorer web exception. - * - * @param cause - * the cause - */ - public SimExplorerWebException(Throwable cause) { - super(cause); - } - - /** - * Instantiates a new sim explorer web exception. - * - * @param message - * the message - */ - public SimExplorerWebException(String message) { - super(message); - } - - /** - * Instantiates a new sim explorer web exception. - * - * @param message - * the message - * @param cause - * the cause - */ - public SimExplorerWebException(String message, Throwable cause) { - super(message, cause); - } - -} Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -22,7 +22,6 @@ import fr.cemagref.simexplorer.is.entities.metadata.MetaData; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.services.RemoteStorageService; /** @@ -84,7 +83,7 @@ .findFullTextCount(token, query, false); } } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + throw new RuntimeException(e); } return result; } @@ -131,7 +130,7 @@ 1 + endIndex - startIndex, dateOrder); } } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + throw new RuntimeException(e); } } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -20,7 +20,6 @@ import org.apache.tapestry.annotations.InjectPage; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.services.RemoteStorageService; /** @@ -36,15 +35,11 @@ * On action from confirm. * * @return the object + * @throws SimExplorerException */ - public Object onActionFromConfirm() { - try { - RemoteStorageService.getStorageService().deleteElement(getToken(), - getMetadata().getUuid(), - getMetadata().getVersion().toString()); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + public Object onActionFromConfirm() throws SimExplorerException { + RemoteStorageService.getStorageService().deleteElement(getToken(), getMetadata().getUuid(), + getMetadata().getVersion().toString()); return elementDetail; } @@ -52,14 +47,10 @@ * On action from confirm all. * * @return the object + * @throws SimExplorerException */ - public Object onActionFromConfirmAll() { - try { - RemoteStorageService.getStorageService().deleteElement(getToken(), - getMetadata().getUuid()); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + public Object onActionFromConfirmAll() throws SimExplorerException { + RemoteStorageService.getStorageService().deleteElement(getToken(), getMetadata().getUuid()); return elementDetail; } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDownload.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -33,7 +33,7 @@ import fr.cemagref.simexplorer.is.entities.data.Library; import fr.cemagref.simexplorer.is.entities.data.LoggableElement; import fr.cemagref.simexplorer.is.entities.metadata.MetaData; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.ui.web.services.RemoteStorageService; import fr.cemagref.simexplorer.is.ui.web.tools.AttachmentStreamResponse; import fr.cemagref.simexplorer.is.ui.web.tools.XMLAttachment; @@ -56,22 +56,17 @@ * On action from download xml. * * @return the object + * @throws SimExplorerException */ - public Object onActionFromDownloadXML() { + public Object onActionFromDownloadXML() throws SimExplorerException { Object response; MetaData mde = getMetadata(); - try { - InputStream stream = RemoteStorageService.getStorageService() - .retrieveElementXML(getToken(), mde.getUuid(), - mde.getVersion().toString()); - response = new XMLAttachment(stream, mde.getType() + "." - + mde.getUuid() + ".v" + mde.getVersion()); - } catch (Exception e) { - throw new SimExplorerWebException(e); - } + InputStream stream = RemoteStorageService.getStorageService().retrieveElementXML(getToken(), mde.getUuid(), + mde.getVersion().toString()); + response = new XMLAttachment(stream, mde.getType() + "." + mde.getUuid() + ".v" + mde.getVersion()); return response; } @@ -80,21 +75,16 @@ * On action from download full. * * @return the object + * @throws SimExplorerException */ - public Object onActionFromDownloadFull() { + public Object onActionFromDownloadFull() throws SimExplorerException { Object response; MetaData mde = getMetadata(); - try { - InputStream stream = RemoteStorageService.getStorageService() - .retrieveElementFull(getToken(), mde.getUuid(), - mde.getVersion().toString()); - response = new ZipAttachment(stream, mde.getType() + "." - + mde.getUuid() + ".v" + mde.getVersion()); - } catch (Exception e) { - throw new SimExplorerWebException(e); - } + InputStream stream = RemoteStorageService.getStorageService().retrieveElementFull(getToken(), mde.getUuid(), + mde.getVersion().toString()); + response = new ZipAttachment(stream, mde.getType() + "." + mde.getUuid() + ".v" + mde.getVersion()); return response; } @@ -102,37 +92,29 @@ /** * On download file. * - * @param context - * the context + * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onDownloadFile(String context) { + public Object onDownloadFile(String context) throws SimExplorerException { StreamResponse response = null; - try { - StringTokenizer st = new StringTokenizer(context, ","); - String uuid = st.nextToken(); - String version = st.nextToken(); - String attachmentUniqueId = st.nextToken(); + StringTokenizer st = new StringTokenizer(context, ","); + String uuid = st.nextToken(); + String version = st.nextToken(); + String attachmentUniqueId = st.nextToken(); - MetaData metadata = RemoteStorageService.getStorageService() - .getMetadata(getToken(), uuid, version); - List<Attachment> attachments = metadata.getAttachments(); - for (Attachment attachment : attachments) { - if (attachment.getUniqueId().equals(attachmentUniqueId)) { - InputStream stream = RemoteStorageService - .getStorageService().retrieveElementData( - getToken(), uuid, version, attachment); + MetaData metadata = RemoteStorageService.getStorageService().getMetadata(getToken(), uuid, version); + List<Attachment> attachments = metadata.getAttachments(); + for (Attachment attachment : attachments) { + if (attachment.getUniqueId().equals(attachmentUniqueId)) { + InputStream stream = RemoteStorageService.getStorageService().retrieveElementData(getToken(), uuid, + version, attachment); - response = new AttachmentStreamResponse(stream, attachment - .getFileName()); - return response; - } + response = new AttachmentStreamResponse(stream, attachment.getFileName()); + return response; } - - } catch (Exception e) { - throw new SimExplorerWebException(e); } return response; @@ -196,22 +178,19 @@ node.setType(TreeNode.TYPE_FOLDER); - node.setColumns(generateStringArray("Application exploration", - getMetadata().getName())); + node.setColumns(generateStringArray("Application exploration", getMetadata().getName())); List<TreeNode> children = new ArrayList<TreeNode>(); TreeNode node1 = new TreeNode(); node1.setType(TreeNode.TYPE_FOLDER); node1.setColumns(generateStringArray("Components")); - node1 - .setChildren(generateComponents((ExplorationApplication) getElement())); + node1.setChildren(generateComponents((ExplorationApplication) getElement())); children.add(node1); TreeNode node2 = new TreeNode(); node2.setType(TreeNode.TYPE_FOLDER); node2.setColumns(generateStringArray("Explorations")); - node2 - .setChildren(generateExplorations((ExplorationApplication) getElement())); + node2.setChildren(generateExplorations((ExplorationApplication) getElement())); children.add(node2); node.setChildren(children); @@ -221,16 +200,13 @@ /** * Generate explorations. * - * @param explorationApplication - * the exploration application + * @param explorationApplication the exploration application * * @return the list< tree node> */ - private List<TreeNode> generateExplorations( - ExplorationApplication explorationApplication) { + private List<TreeNode> generateExplorations(ExplorationApplication explorationApplication) { List<TreeNode> res = new ArrayList<TreeNode>(); - for (ExplorationData explorationData : explorationApplication - .getExplorations()) { + for (ExplorationData explorationData : explorationApplication.getExplorations()) { res.add(generateExplorationData(explorationData)); } return res; @@ -239,8 +215,7 @@ /** * Generate exploration data. * - * @param explorationData - * the exploration data + * @param explorationData the exploration data * * @return the tree node */ @@ -248,13 +223,12 @@ TreeNode explorationDataNode = new TreeNode(); explorationDataNode.setType(TreeNode.TYPE_FOLDER); - explorationDataNode.setColumns(generateStringArray("Exploration data", - explorationData.getMetaData().getName())); + explorationDataNode + .setColumns(generateStringArray("Exploration data", explorationData.getMetaData().getName())); List<TreeNode> children = new ArrayList<TreeNode>(); - List<Attachment> attachments = explorationData.getMetaData() - .getAttachments(); + List<Attachment> attachments = explorationData.getMetaData().getAttachments(); for (Attachment attachment : attachments) { children.add(generateDownload(explorationData, attachment)); @@ -267,13 +241,11 @@ /** * Generate components. * - * @param explorationApplication - * the exploration application + * @param explorationApplication the exploration application * * @return the list< tree node> */ - private List<TreeNode> generateComponents( - ExplorationApplication explorationApplication) { + private List<TreeNode> generateComponents(ExplorationApplication explorationApplication) { Set<Component> components = explorationApplication.getComponents(); List<TreeNode> res = new ArrayList<TreeNode>(); @@ -287,8 +259,7 @@ /** * Generate component. * - * @param component - * the component + * @param component the component * * @return the tree node */ @@ -296,8 +267,7 @@ TreeNode componentNode = new TreeNode(); componentNode.setType(TreeNode.TYPE_FOLDER); - componentNode.setColumns(generateStringArray("Component", component - .getMetaData().getName())); + componentNode.setColumns(generateStringArray("Component", component.getMetaData().getName())); List<TreeNode> children = new ArrayList<TreeNode>(); @@ -318,8 +288,7 @@ /** * Generate libraries. * - * @param libraries - * the libraries + * @param libraries the libraries * * @return the list< tree node> */ @@ -335,8 +304,7 @@ /** * Generate library. * - * @param library - * the library + * @param library the library * * @return the tree node */ @@ -351,33 +319,27 @@ } node.setChildren(children); - node.setColumns(generateStringArray("Library", library.getMetaData() - .getName())); + node.setColumns(generateStringArray("Library", library.getMetaData().getName())); return node; } /** * Generate download. * - * @param explorationData - * the exploration data - * @param attachment - * the attachment + * @param explorationData the exploration data + * @param attachment the attachment * * @return the tree node */ - private TreeNode generateDownload(LoggableElement explorationData, - Attachment attachment) { + private TreeNode generateDownload(LoggableElement explorationData, Attachment attachment) { TreeNode node = new TreeNode(); node.setType(TreeNode.TYPE_DOCUMENT); - String context = explorationData.getMetaData().getUuid() + "," - + explorationData.getMetaData().getVersion() + "," - + attachment.getUniqueId(); + String context = explorationData.getMetaData().getUuid() + "," + explorationData.getMetaData().getVersion() + + "," + attachment.getUniqueId(); - node.setColumns(generateStringArray(attachment.getContentType() - .getDescription(), attachment.getDataHash(), generateString( - attachment.getFileName(), "downloadFile", context))); + node.setColumns(generateStringArray(attachment.getContentType().getDescription(), attachment.getDataHash(), + generateString(attachment.getFileName(), "downloadFile", context))); return node; } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -27,7 +27,6 @@ import fr.cemagref.simexplorer.is.entities.metadata.MetaData; import fr.cemagref.simexplorer.is.entities.metadata.Version; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.services.RemoteStorageService; /** @@ -43,13 +42,9 @@ * @see fr.cemagref.simexplorer.is.ui.web.pages.ElementPage#setup(java.lang.String, java.lang.String) */ @Override - public void setup(String uuid, String version) { + public void setup(String uuid, String version) throws SimExplorerException { super.setup(uuid, version); - try { versions = RemoteStorageService.getStorageService().getVersions(getToken(), uuid); - } catch (Exception e) { - throw new SimExplorerWebException(e); - } } /* (non-Javadoc) Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -26,7 +26,6 @@ import fr.cemagref.simexplorer.is.entities.metadata.MetaData; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.exceptions.SimExplorerTechnicalException; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.pages.security.UserPage; import fr.cemagref.simexplorer.is.ui.web.services.RemoteStorageService; Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -29,6 +29,7 @@ import de.hsofttec.t5components.annotations.SetterGetter; import fr.cemagref.simexplorer.is.entities.metadata.MetaData; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.ui.web.grid.ElementDataSource; import fr.cemagref.simexplorer.is.ui.web.pages.security.UserPage; import fr.cemagref.simexplorer.is.ui.web.tools.MetaDataModelFactory; @@ -119,8 +120,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onActionFromDetailElement(String context) { + public Object onActionFromDetailElement(String context) throws SimExplorerException { StringTokenizer st = new StringTokenizer(context, ","); String uuid = st.nextToken(); String version = st.nextToken(); Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementMetadata.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementMetadata.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementMetadata.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -113,8 +113,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onActionFromDetailElementUsed(String context) { + public Object onActionFromDetailElementUsed(String context) throws SimExplorerException { return onDetails(context); } @@ -124,8 +125,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onActionFromDetailElementUsing(String context) { + public Object onActionFromDetailElementUsing(String context) throws SimExplorerException { return onDetails(context); } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPage.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPage.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPage.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -21,7 +21,7 @@ import fr.cemagref.simexplorer.is.entities.data.LoggableElement; import fr.cemagref.simexplorer.is.entities.metadata.MetaData; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.ui.web.pages.security.UserPage; import fr.cemagref.simexplorer.is.ui.web.services.RemoteStorageService; @@ -37,18 +37,12 @@ /** * Prepare page. * - * @param uuid - * Id of element to display - * @param version - * Version of element to display + * @param uuid Id of element to display + * @param version Version of element to display + * @throws SimExplorerException */ - public void setup(String uuid, String version) { - try { - element = RemoteStorageService.getStorageService().getLoggableElement( - getToken(), uuid, version); - } catch (Exception e) { - throw new SimExplorerWebException(e); - } + public void setup(String uuid, String version) throws SimExplorerException { + element = RemoteStorageService.getStorageService().getLoggableElement(getToken(), uuid, version); } /** Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -31,6 +31,7 @@ import fr.cemagref.simexplorer.is.attachment.Attachment; import fr.cemagref.simexplorer.is.entities.metadata.MetaData; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; /** * The Class ElementPageDetail. @@ -75,8 +76,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - private Object preparePage(ElementPage page, String context) { + private Object preparePage(ElementPage page, String context) throws SimExplorerException { StringTokenizer st = new StringTokenizer(context, ","); String uuid = st.nextToken(); String version = st.nextToken(); @@ -90,8 +92,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onExport(String context) { + public Object onExport(String context) throws SimExplorerException { return preparePage(elementDownload, context); } @@ -101,8 +104,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onHistory(String context) { + public Object onHistory(String context) throws SimExplorerException { return preparePage(elementHistory, context); } @@ -112,8 +116,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onDelete(String context) { + public Object onDelete(String context) throws SimExplorerException { return preparePage(elementDelete, context); } @@ -123,8 +128,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onRights(String context) { + public Object onRights(String context) throws SimExplorerException { return preparePage(elementRights, context); } @@ -134,8 +140,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onDetails(String context) { + public Object onDetails(String context) throws SimExplorerException { return preparePage(elementDetail, context); } @@ -145,8 +152,9 @@ * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onMetadata(String context) { + public Object onMetadata(String context) throws SimExplorerException { return preparePage(elementMetadata, context); } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -31,7 +31,6 @@ import fr.cemagref.simexplorer.is.security.entities.Group; import fr.cemagref.simexplorer.is.security.entities.Permission; import fr.cemagref.simexplorer.is.security.entities.User; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.services.GroupValueEncoder; import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; import fr.cemagref.simexplorer.is.ui.web.services.UserValueEncoder; @@ -97,7 +96,7 @@ * @see fr.cemagref.simexplorer.is.ui.web.pages.ElementPage#setup(java.lang.String, java.lang.String) */ @Override - public void setup(String uuid, String version) { + public void setup(String uuid, String version) throws SimExplorerException { super.setup(uuid, version); userEncoder = new UserValueEncoder(getToken()); groupEncoder = new GroupValueEncoder(getToken()); @@ -114,9 +113,8 @@ adminUsers = new ArrayList<User>(); adminGroups = new ArrayList<Group>(); - Permission[] permissions = RemoteSecurityService - .getAuthentificationService().getPermissions( - getMetadata().getUuid()); + Permission[] permissions = RemoteSecurityService.getAuthentificationService().getPermissions( + getMetadata().getUuid()); for (Permission permission : permissions) { if (permission.isOwner() && permission.getActor() instanceof User) { ownerUsers.add((User) permission.getActor()); @@ -124,28 +122,23 @@ if (permission.isCanRead() && permission.getActor() instanceof User) { readUsers.add((User) permission.getActor()); } - if (permission.isCanWrite() - && permission.getActor() instanceof User) { + if (permission.isCanWrite() && permission.getActor() instanceof User) { writeUsers.add((User) permission.getActor()); } - if (permission.isCanAdmin() - && permission.getActor() instanceof User) { + if (permission.isCanAdmin() && permission.getActor() instanceof User) { adminUsers.add((User) permission.getActor()); } if (permission.isOwner() && permission.getActor() instanceof Group) { ownerGroups.add((Group) permission.getActor()); } - if (permission.isCanRead() - && permission.getActor() instanceof Group) { + if (permission.isCanRead() && permission.getActor() instanceof Group) { readGroups.add((Group) permission.getActor()); } - if (permission.isCanWrite() - && permission.getActor() instanceof Group) { + if (permission.isCanWrite() && permission.getActor() instanceof Group) { writeGroups.add((Group) permission.getActor()); } - if (permission.isCanAdmin() - && permission.getActor() instanceof Group) { + if (permission.isCanAdmin() && permission.getActor() instanceof Group) { adminGroups.add((Group) permission.getActor()); } } @@ -155,15 +148,12 @@ /** * Gets the permission. * - * @param actor - * the actor - * @param permissions - * the permissions + * @param actor the actor + * @param permissions the permissions * * @return the permission */ - private Permission getPermission(Actor actor, - Map<Actor, Permission> permissions) { + private Permission getPermission(Actor actor, Map<Actor, Permission> permissions) { Permission permission = permissions.get(actor); if (permission == null) { permission = new Permission(); @@ -182,8 +172,9 @@ * On success. * * @return the object + * @throws SimExplorerException */ - public Object onSuccess() { + public Object onSuccess() throws SimExplorerException { Map<Actor, Permission> permissions = new HashMap<Actor, Permission>(); for (User user : ownerUsers) { @@ -212,11 +203,9 @@ getPermission(group, permissions).setCanAdmin(true); } - Permission[] permissionsArray = permissions.values().toArray( - new Permission[permissions.values().size()]); + Permission[] permissionsArray = permissions.values().toArray(new Permission[permissions.values().size()]); - RemoteSecurityService.getAuthentificationService().setPermissions( - getMetadata().getUuid(), permissionsArray); + RemoteSecurityService.getAuthentificationService().setPermissions(getMetadata().getUuid(), permissionsArray); return elementDetail; } @@ -225,16 +214,12 @@ * Gets the users. * * @return the users + * @throws SimExplorerException */ - public List<User> getUsers() { + public List<User> getUsers() throws SimExplorerException { List<User> result = new ArrayList<User>(); - try { - User[] users = RemoteSecurityService.getAuthentificationService() - .getUsers(getToken()); - result.addAll(Arrays.asList(users)); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + User[] users = RemoteSecurityService.getAuthentificationService().getUsers(getToken()); + result.addAll(Arrays.asList(users)); return result; } @@ -242,16 +227,12 @@ * Gets the groups. * * @return the groups + * @throws SimExplorerException */ - public List<Group> getGroups() { + public List<Group> getGroups() throws SimExplorerException { List<Group> result = new ArrayList<Group>(); - try { - Group[] groups = RemoteSecurityService.getAuthentificationService() - .getGroups(getToken()); - result.addAll(Arrays.asList(groups)); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + Group[] groups = RemoteSecurityService.getAuthentificationService().getGroups(getToken()); + result.addAll(Arrays.asList(groups)); return result; } @@ -268,8 +249,7 @@ /** * Sets the owner users. * - * @param ownerUsers - * the new owner users + * @param ownerUsers the new owner users */ public void setOwnerUsers(List<User> ownerUsers) { this.ownerUsers = ownerUsers; @@ -287,8 +267,7 @@ /** * Sets the read users. * - * @param readUsers - * the new read users + * @param readUsers the new read users */ public void setReadUsers(List<User> readUsers) { this.readUsers = readUsers; @@ -306,8 +285,7 @@ /** * Sets the read groups. * - * @param readGroups - * the new read groups + * @param readGroups the new read groups */ public void setReadGroups(List<Group> readGroups) { this.readGroups = readGroups; @@ -325,8 +303,7 @@ /** * Sets the write users. * - * @param writeUsers - * the new write users + * @param writeUsers the new write users */ public void setWriteUsers(List<User> writeUsers) { this.writeUsers = writeUsers; @@ -344,8 +321,7 @@ /** * Sets the write groups. * - * @param writeGroups - * the new write groups + * @param writeGroups the new write groups */ public void setWriteGroups(List<Group> writeGroups) { this.writeGroups = writeGroups; @@ -363,8 +339,7 @@ /** * Sets the admin users. * - * @param adminUsers - * the new admin users + * @param adminUsers the new admin users */ public void setAdminUsers(List<User> adminUsers) { this.adminUsers = adminUsers; @@ -382,8 +357,7 @@ /** * Sets the admin groups. * - * @param adminGroups - * the new admin groups + * @param adminGroups the new admin groups */ public void setAdminGroups(List<Group> adminGroups) { this.adminGroups = adminGroups; @@ -419,8 +393,7 @@ /** * Sets the owner groups. * - * @param ownerGroups - * the new owner groups + * @param ownerGroups the new owner groups */ public void setOwnerGroups(List<Group> ownerGroups) { this.ownerGroups = ownerGroups; Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -27,7 +27,7 @@ import org.apache.tapestry.services.ExceptionReporter; import de.hsofttec.t5components.annotations.SetterGetter; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; /** * The Class ExceptionReport. @@ -39,7 +39,7 @@ private boolean _unknown; /** The exception. */ - private SimExplorerWebException exception; + private SimExplorerException exception; /** The _stack. */ @SuppressWarnings("unused") @@ -80,7 +80,7 @@ * @see org.apache.tapestry.services.ExceptionReporter#reportException(java.lang.Throwable) */ public void reportException(Throwable exceptionReported) { - SimExplorerWebException simException = getException(exceptionReported); + SimExplorerException simException = getException(exceptionReported); if (simException != null) { _unknown = false; this.exception = simException; @@ -104,10 +104,10 @@ * * @return the exception */ - private SimExplorerWebException getException(Throwable exceptionReported) { + private SimExplorerException getException(Throwable exceptionReported) { if (exceptionReported != null) { - if (exceptionReported instanceof SimExplorerWebException) { - SimExplorerWebException result = (SimExplorerWebException) exceptionReported; + if (exceptionReported instanceof SimExplorerException) { + SimExplorerException result = (SimExplorerException) exceptionReported; return result; } return getException(exceptionReported.getCause()); @@ -122,7 +122,9 @@ */ public String getErrorMessage() { if (!_unknown) { + return exception.getMessage(); + } return ""; } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -28,7 +28,6 @@ import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.security.entities.Group; import fr.cemagref.simexplorer.is.security.entities.User; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.pages.security.AdminPage; import fr.cemagref.simexplorer.is.ui.web.services.GroupValueEncoder; import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; @@ -74,33 +73,23 @@ /** * Sets the up. * - * @param groupId - * the new up + * @param groupId the new up + * @throws SimExplorerException */ - void setup(int groupId) { + void setup(int groupId) throws SimExplorerException { this.usersInGroup = new ArrayList<User>(); this.groupsInGroup = new ArrayList<Group>(); if (groupId == -1) { this.group = new Group(); this.group.setOwner(getUserLogged()); } else { - try { - this.group = RemoteSecurityService.getAuthentificationService() - .getGroup(getToken(), groupId); + this.group = RemoteSecurityService.getAuthentificationService().getGroup(getToken(), groupId); - User[] users = RemoteSecurityService - .getAuthentificationService().getUsersOfGroup( - getToken(), group); - this.usersInGroup.addAll(Arrays.asList(users)); + User[] users = RemoteSecurityService.getAuthentificationService().getUsersOfGroup(getToken(), group); + this.usersInGroup.addAll(Arrays.asList(users)); - Group[] groups = RemoteSecurityService - .getAuthentificationService().getGroupsOfGroup( - getToken(), group); - this.groupsInGroup.addAll(Arrays.asList(groups)); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } - + Group[] groups = RemoteSecurityService.getAuthentificationService().getGroupsOfGroup(getToken(), group); + this.groupsInGroup.addAll(Arrays.asList(groups)); } userEncoder = new UserValueEncoder(getToken()); groupEncoder = new GroupValueEncoder(getToken()); @@ -110,37 +99,30 @@ * On success. * * @return the object + * @throws SimExplorerException */ - public Object onSuccess() { - try { - if (group.getId() == null) { - group = RemoteSecurityService.getAuthentificationService() - .saveGroup(getToken(), group.getName()); - } else { - group = RemoteSecurityService.getAuthentificationService() - .updateGroup(getToken(), group); - } + public Object onSuccess() throws SimExplorerException { + if (group.getId() == null) { + group = RemoteSecurityService.getAuthentificationService().saveGroup(getToken(), group.getName()); + } else { + group = RemoteSecurityService.getAuthentificationService().updateGroup(getToken(), group); + } - Integer[] usersIds = new Integer[usersInGroup.size()]; - int i = 0; - for (User user : usersInGroup) { - usersIds[i] = user.getId(); - i++; - } - RemoteSecurityService.getAuthentificationService().setUsersOfGroup( - getToken(), group, usersIds); + Integer[] usersIds = new Integer[usersInGroup.size()]; + int i = 0; + for (User user : usersInGroup) { + usersIds[i] = user.getId(); + i++; + } + RemoteSecurityService.getAuthentificationService().setUsersOfGroup(getToken(), group, usersIds); - Integer[] groupsIds = new Integer[groupsInGroup.size()]; - i = 0; - for (Group aGroup : groupsInGroup) { - groupsIds[i] = aGroup.getId(); - i++; - } - RemoteSecurityService.getAuthentificationService() - .setGroupsOfGroup(getToken(), group, groupsIds); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + Integer[] groupsIds = new Integer[groupsInGroup.size()]; + i = 0; + for (Group aGroup : groupsInGroup) { + groupsIds[i] = aGroup.getId(); + i++; } + RemoteSecurityService.getAuthentificationService().setGroupsOfGroup(getToken(), group, groupsIds); return groupList; } @@ -158,16 +140,12 @@ * Gets the users. * * @return the users + * @throws SimExplorerException */ - public List<User> getUsers() { + public List<User> getUsers() throws SimExplorerException { List<User> result = new ArrayList<User>(); - try { - User[] users = RemoteSecurityService.getAuthentificationService() - .getUsers(getToken()); - result.addAll(Arrays.asList(users)); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + User[] users = RemoteSecurityService.getAuthentificationService().getUsers(getToken()); + result.addAll(Arrays.asList(users)); return result; } @@ -175,16 +153,12 @@ * Gets the groups. * * @return the groups + * @throws SimExplorerException */ - public List<Group> getGroups() { + public List<Group> getGroups() throws SimExplorerException { List<Group> result = new ArrayList<Group>(); - try { - Group[] groups = RemoteSecurityService.getAuthentificationService() - .getGroups(getToken()); - result.addAll(Arrays.asList(groups)); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + Group[] groups = RemoteSecurityService.getAuthentificationService().getGroups(getToken()); + result.addAll(Arrays.asList(groups)); return result; } @@ -228,8 +202,7 @@ /** * Sets the users in group. * - * @param usersInGroup - * the new users in group + * @param usersInGroup the new users in group */ public void setUsersInGroup(List<User> usersInGroup) { this.usersInGroup = usersInGroup; @@ -256,8 +229,7 @@ /** * Sets the group list. * - * @param groupList - * the new group list + * @param groupList the new group list */ public void setGroupList(GroupList groupList) { this.groupList = groupList; @@ -275,8 +247,7 @@ /** * Sets the groups in group. * - * @param groupsInGroup - * the new groups in group + * @param groupsInGroup the new groups in group */ public void setGroupsInGroup(List<Group> groupsInGroup) { this.groupsInGroup = groupsInGroup; @@ -294,8 +265,7 @@ /** * Sets the owner. * - * @param owner - * the new owner + * @param owner the new owner */ public void setOwner(User owner) { this.group.setOwner(owner); Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -30,7 +30,6 @@ import de.hsofttec.t5components.annotations.SetterGetter; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.security.entities.Group; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.pages.security.AdminPage; import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; @@ -89,22 +88,15 @@ * Gets the groups. * * @return the groups + * @throws SimExplorerException */ - public Group[] getGroups() { + public Group[] getGroups() throws SimExplorerException { Group[] groups; - try { - - if (isUserSuperAdmin()) { - groups = RemoteSecurityService.getAuthentificationService() - .getGroups(getToken()); - } else { - groups = RemoteSecurityService.getAuthentificationService() - .getGroupsOwnedBy(getToken(), getUserLogged()); - } - - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + if (isUserSuperAdmin()) { + groups = RemoteSecurityService.getAuthentificationService().getGroups(getToken()); + } else { + groups = RemoteSecurityService.getAuthentificationService().getGroupsOwnedBy(getToken(), getUserLogged()); } return groups; @@ -113,30 +105,25 @@ /** * On action from delete. * - * @param context - * the context + * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onActionFromDelete(Integer context) { - try { - RemoteSecurityService.getAuthentificationService().deleteGroup( - getToken(), context); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + public Object onActionFromDelete(Integer context) throws SimExplorerException { + RemoteSecurityService.getAuthentificationService().deleteGroup(getToken(), context); return null; } /** * On action from edit. * - * @param context - * the context + * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onActionFromEdit(Integer context) { + public Object onActionFromEdit(Integer context) throws SimExplorerException { groupEdit.setup(context); return groupEdit; } @@ -145,8 +132,9 @@ * On action from add. * * @return the object + * @throws SimExplorerException */ - public Object onActionFromAdd() { + public Object onActionFromAdd() throws SimExplorerException { groupEdit.setup(-1); return groupEdit; } @@ -172,8 +160,7 @@ /** * Sets the group edit. * - * @param groupEdit - * the new group edit + * @param groupEdit the new group edit */ public void setGroupEdit(GroupEdit groupEdit) { this.groupEdit = groupEdit; Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -39,7 +39,6 @@ import fr.cemagref.simexplorer.is.factories.XmlConstants; import fr.cemagref.simexplorer.is.service.ElementGenerator; import fr.cemagref.simexplorer.is.service.ElementGenerator.RandomStream; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.pages.security.SuperAdminPage; import fr.cemagref.simexplorer.is.ui.web.services.RemoteStorageService; @@ -64,65 +63,61 @@ * On action from generate data. * * @return the object + * @throws Exception */ - public Object onActionFromGenerateData() { + public Object onActionFromGenerateData() throws Exception { ElementGenerator elementGenerator = new ElementGenerator(); Random r = new Random(); int c = 20; - try { + for (int i = 0; i < c; i++) { + ExplorationApplication parentEa; + parentEa = elementGenerator.generateRandomEA(); - for (int i = 0; i < c; i++) { - ExplorationApplication parentEa; - parentEa = elementGenerator.generateRandomEA(); + int v = 2 + r.nextInt(5); + Version version = new Version(parentEa.getMetaData().getVersion().toString()); - int v = 2 + r.nextInt(5); - Version version = new Version(parentEa.getMetaData().getVersion().toString()); + for (int j = 0; j < v; j++) { + ExplorationApplication ea = elementGenerator.generateRandomEA(); + ea.getMetaData().setUuid(parentEa.getMetaData().getUuid()); - for (int j = 0; j < v; j++) { - ExplorationApplication ea = elementGenerator.generateRandomEA(); - ea.getMetaData().setUuid(parentEa.getMetaData().getUuid()); + version = version.incVersion(r.nextInt(3)); + ea.getMetaData().setVersion(version.toString()); - version = version.incVersion(r.nextInt(3)); - ea.getMetaData().setVersion(version.toString()); + Map<Attachment, SerializableInputStream> attachments = new HashMap<Attachment, SerializableInputStream>(); - Map<Attachment, SerializableInputStream> attachments = new HashMap<Attachment, SerializableInputStream>(); + List<Attachment> attachmentsKeys = new ArrayList<Attachment>(); - List<Attachment> attachmentsKeys = new ArrayList<Attachment>(); - - attachmentsKeys.addAll(ea.getMetaData().getAttachments()); - Set<Component> components = ea.getComponents(); - for (Component component : components) { - attachmentsKeys.addAll(component.getMetaData().getAttachments()); - Set<Library> libraries = component.getLibraries(); - for (Library library : libraries) { - attachmentsKeys.addAll(library.getMetaData().getAttachments()); - } + attachmentsKeys.addAll(ea.getMetaData().getAttachments()); + Set<Component> components = ea.getComponents(); + for (Component component : components) { + attachmentsKeys.addAll(component.getMetaData().getAttachments()); + Set<Library> libraries = component.getLibraries(); + for (Library library : libraries) { + attachmentsKeys.addAll(library.getMetaData().getAttachments()); } - Set<ExplorationData> explorations = ea.getExplorations(); - for (ExplorationData explorationData : explorations) { - attachmentsKeys.addAll(explorationData.getMetaData().getAttachments()); - } + } + Set<ExplorationData> explorations = ea.getExplorations(); + for (ExplorationData explorationData : explorations) { + attachmentsKeys.addAll(explorationData.getMetaData().getAttachments()); + } - for (Attachment attachment : attachmentsKeys) { - RandomStream randomStream = elementGenerator.generateTextStream(); - attachment.setDataHash(randomStream.getMd5()); - SerializableInputStream remoteStream = new SerializableInputStream(randomStream.getStream()); - attachments.put(attachment, remoteStream); - } - - InputStream xmlStream = BaseEntityFactory.getFactory(ExplorationApplication.class).saveElement( - XmlConstants.VALUE_METADATA_TYPE_EA, ea); - - SerializableInputStream xmlRemoteStream = new SerializableInputStream(xmlStream); - RemoteStorageService.getStorageService().saveElement(getToken(), xmlRemoteStream, attachments); + for (Attachment attachment : attachmentsKeys) { + RandomStream randomStream = elementGenerator.generateTextStream(); + attachment.setDataHash(randomStream.getMd5()); + SerializableInputStream remoteStream = new SerializableInputStream(randomStream.getStream()); + attachments.put(attachment, remoteStream); } + InputStream xmlStream = BaseEntityFactory.getFactory(ExplorationApplication.class).saveElement( + XmlConstants.VALUE_METADATA_TYPE_EA, ea); + + SerializableInputStream xmlRemoteStream = new SerializableInputStream(xmlStream); + RemoteStorageService.getStorageService().saveElement(getToken(), xmlRemoteStream, attachments); } - } catch (Exception e) { - throw new SimExplorerWebException(e); + } return elementList; Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -17,10 +17,8 @@ * ##% */ package fr.cemagref.simexplorer.is.ui.web.pages; -import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; -import fr.cemagref.simexplorer.is.service.AuthenticationServiceHelper; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; -import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; +import java.util.Arrays; + import org.apache.tapestry.annotations.ApplicationState; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.InjectPage; @@ -29,7 +27,9 @@ import org.apache.tapestry.ioc.Messages; import org.apache.tapestry.ioc.annotations.Inject; -import java.util.Arrays; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; +import fr.cemagref.simexplorer.is.service.AuthenticationServiceHelper; +import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; /** The Class Login. */ public class Login { @@ -38,7 +38,7 @@ @Persist private String user; - /** The password.TODO voir si on peut utiliser directement un char[] */ + /** The password.TODO voir si on peut utiliser directement un char[] */ private String password; /** The login. */ @@ -65,47 +65,39 @@ /** * On success. - * + * * @return the object + * @throws SimExplorerException */ - public Object onSuccessFromFormLogin() { - try { - // on hache directement le password pour ne pas le transmettre en clair - char[] chars = password.toCharArray(); - String pass = AuthenticationServiceHelper.computeHash(chars); - // reset du tableau - Arrays.fill(chars, (char) 0); - password = null; - token = RemoteSecurityService.getAuthentificationService().loginUser(user, pass); - if (token != null && !token.equals("")) { - return elementList; - } - formLogin.recordError(messages - .get("simexplorer.ui.web.login.invalid")); - return this; - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + public Object onSuccessFromFormLogin() throws SimExplorerException { + // on hache directement le password pour ne pas le transmettre en clair + char[] chars = password.toCharArray(); + String pass = AuthenticationServiceHelper.computeHash(chars); + // reset du tableau + Arrays.fill(chars, (char) 0); + password = null; + token = RemoteSecurityService.getAuthentificationService().loginUser(user, pass); + if (token != null && !token.equals("")) { + return elementList; } + formLogin.recordError(messages.get("simexplorer.ui.web.login.invalid")); + return this; } /** * On success from form request account. - * + * * @return the object + * @throws SimExplorerException */ - public Object onSuccessFromFormRequestAccount() { - try { - RemoteSecurityService.getAuthentificationService().requestAccount( - login, mail); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + public Object onSuccessFromFormRequestAccount() throws SimExplorerException { + RemoteSecurityService.getAuthentificationService().requestAccount(login, mail); return this; } /** * Gets the user. - * + * * @return the user */ public String getUser() { @@ -114,7 +106,7 @@ /** * Sets the user. - * + * * @param user the new user */ public void setUser(String user) { @@ -123,7 +115,7 @@ /** * Gets the password. - * + * * @return the password */ public String getPassword() { @@ -132,7 +124,7 @@ /** * Sets the password. - * + * * @param password the new password */ public void setPassword(String password) { @@ -141,7 +133,7 @@ /** * Gets the element list. - * + * * @return the element list */ public ElementList getElementList() { @@ -150,7 +142,7 @@ /** * Gets the window title. - * + * * @return the window title */ public String getWindowTitle() { @@ -159,7 +151,7 @@ /** * Gets the login. - * + * * @return the login */ public String getLogin() { @@ -168,7 +160,7 @@ /** * Sets the login. - * + * * @param login the new login */ public void setLogin(String login) { @@ -177,7 +169,7 @@ /** * Gets the mail. - * + * * @return the mail */ public String getMail() { @@ -186,7 +178,7 @@ /** * Sets the mail. - * + * * @param mail the new mail */ public void setMail(String mail) { Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -34,7 +34,6 @@ import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.security.entities.Group; import fr.cemagref.simexplorer.is.security.entities.User; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.pages.security.AdminPage; import fr.cemagref.simexplorer.is.ui.web.services.GroupValueEncoder; import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; @@ -103,24 +102,17 @@ /** * Sets the up. * - * @param userId - * the new up + * @param userId the new up + * @throws SimExplorerException */ - void setup(int userId) { + void setup(int userId) throws SimExplorerException { this.groupsOfUser = new ArrayList<Group>(); if (userId == -1) { this.user = new User(); } else { - try { - this.user = RemoteSecurityService.getAuthentificationService() - .getUser(getToken(), userId); - Group[] groups = RemoteSecurityService - .getAuthentificationService().getGroupsOfUser( - getToken(), this.user); - groupsOfUser.addAll(Arrays.asList(groups)); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + this.user = RemoteSecurityService.getAuthentificationService().getUser(getToken(), userId); + Group[] groups = RemoteSecurityService.getAuthentificationService().getGroupsOfUser(getToken(), this.user); + groupsOfUser.addAll(Arrays.asList(groups)); } groupEncoder = new GroupValueEncoder(getToken()); @@ -130,44 +122,34 @@ * On success. * * @return the object + * @throws SimExplorerException */ - public Object onSuccess() { - try { - if (user.getId() == null) { - user = RemoteSecurityService.getAuthentificationService() - .saveUser(getToken(), user.getLogin(), user.getMail()); - return this; - } - user = RemoteSecurityService.getAuthentificationService() - .updateUser(getToken(), user); - Integer[] groupsIds = new Integer[groupsOfUser.size()]; - int i = 0; - for (Group group : groupsOfUser) { - groupsIds[i] = group.getId(); - i++; - } - RemoteSecurityService.getAuthentificationService().setGroupsOfUser( - getToken(), user, groupsIds); - return userList; - - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + public Object onSuccess() throws SimExplorerException { + if (user.getId() == null) { + user = RemoteSecurityService.getAuthentificationService().saveUser(getToken(), user.getLogin(), + user.getMail()); + return this; } + user = RemoteSecurityService.getAuthentificationService().updateUser(getToken(), user); + Integer[] groupsIds = new Integer[groupsOfUser.size()]; + int i = 0; + for (Group group : groupsOfUser) { + groupsIds[i] = group.getId(); + i++; + } + RemoteSecurityService.getAuthentificationService().setGroupsOfUser(getToken(), user, groupsIds); + return userList; } /** * Gets the groups. * * @return the groups + * @throws SimExplorerException */ - public List<Group> getGroups() { + public List<Group> getGroups() throws SimExplorerException { Group[] groups; - try { - groups = RemoteSecurityService.getAuthentificationService() - .getGroups(getToken()); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + groups = RemoteSecurityService.getAuthentificationService().getGroups(getToken()); List<Group> result = new ArrayList<Group>(); result.addAll(Arrays.asList(groups)); return result; @@ -177,17 +159,13 @@ * Gets the owned groups. * * @return the owned groups + * @throws SimExplorerException */ - public Group[] getOwnedGroups() { - try { - if (user.getId() == null) { - return new Group[0]; - } - return RemoteSecurityService.getAuthentificationService() - .getGroupsOwnedBy(getToken(), user); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + public Group[] getOwnedGroups() throws SimExplorerException { + if (user.getId() == null) { + return new Group[0]; } + return RemoteSecurityService.getAuthentificationService().getGroupsOwnedBy(getToken(), user); } /** @@ -221,15 +199,11 @@ * On action from reset password. * * @return the object + * @throws SimExplorerException */ - public Object onActionFromResetPassword() { - try { - RemoteSecurityService.getAuthentificationService().resetPassword( - getToken(), user.getLogin()); - return this; - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + public Object onActionFromResetPassword() throws SimExplorerException { + RemoteSecurityService.getAuthentificationService().resetPassword(getToken(), user.getLogin()); + return this; } /** @@ -244,8 +218,7 @@ /** * Sets the user list. * - * @param userList - * the new user list + * @param userList the new user list */ public void setUserList(UserList userList) { this.userList = userList; @@ -272,8 +245,7 @@ /** * Sets the groups of user. * - * @param groupsOfUser - * the new groups of user + * @param groupsOfUser the new groups of user */ public void setGroupsOfUser(List<Group> groupsOfUser) { this.groupsOfUser = groupsOfUser; Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -30,7 +30,6 @@ import de.hsofttec.t5components.annotations.SetterGetter; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.security.entities.User; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.pages.security.AdminPage; import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; @@ -93,46 +92,35 @@ * Gets the users. * * @return the users + * @throws SimExplorerException */ - public User[] getUsers() { - User[] users; - try { - users = RemoteSecurityService.getAuthentificationService() - .getUsers(getToken()); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } - + public User[] getUsers() throws SimExplorerException { + User[] users = RemoteSecurityService.getAuthentificationService().getUsers(getToken()); return users; } /** * On action from delete. * - * @param context - * the context + * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onActionFromDelete(Integer context) { - try { - RemoteSecurityService.getAuthentificationService().deleteUser( - getToken(), context); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + public Object onActionFromDelete(Integer context) throws SimExplorerException { + RemoteSecurityService.getAuthentificationService().deleteUser(getToken(), context); return null; } /** * On action from edit. * - * @param context - * the context + * @param context the context * * @return the object + * @throws SimExplorerException */ - public Object onActionFromEdit(Integer context) { + public Object onActionFromEdit(Integer context) throws SimExplorerException { userEdit.setup(context); return userEdit; } @@ -141,8 +129,9 @@ * On action from add. * * @return the object + * @throws SimExplorerException */ - public Object onActionFromAdd() { + public Object onActionFromAdd() throws SimExplorerException { userEdit.setup(-1); return userEdit; } @@ -159,8 +148,7 @@ /** * Sets the user edit. * - * @param userEdit - * the new user edit + * @param userEdit the new user edit */ public void setUserEdit(UserEdit userEdit) { this.userEdit = userEdit; Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -23,8 +23,8 @@ import org.apache.tapestry.ioc.annotations.Inject; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerSecurityException; import fr.cemagref.simexplorer.is.security.entities.User; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; import fr.cemagref.simexplorer.is.ui.web.services.RemoteSecurityService; /** @@ -60,22 +60,24 @@ * On activate. * * @return the object + * + * @throws SimExplorerException the sim explorer exception */ - Object onActivate() { + Object onActivate() throws SimExplorerException { getUserRights(); if (!userLogged) return "Login"; if (!hasAccessToPage()) - throw new SimExplorerWebException(messages - .get("simexplorer.service.security.norights")); + throw new SimExplorerSecurityException(); return null; } /** * Gets the user rights. * + * @throws SimExplorerException the sim explorer exception */ - private void getUserRights() { + private void getUserRights() throws SimExplorerException { user = computeUserLogged(); if (user != null) { userLogged = true; @@ -101,16 +103,12 @@ * Compute user logged. * * @return the user + * @throws SimExplorerException */ - private User computeUserLogged() { + private User computeUserLogged() throws SimExplorerException { User loggedUser = null; if (token != null) { - try { - loggedUser = RemoteSecurityService.getAuthentificationService() - .getLoggedUser(token); - } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); - } + loggedUser = RemoteSecurityService.getAuthentificationService().getLoggedUser(token); } return loggedUser; } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/GroupValueEncoder.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -21,7 +21,6 @@ import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.security.entities.Group; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; /** * The Class GroupValueEncoder. @@ -58,7 +57,7 @@ group = RemoteSecurityService.getAuthentificationService().getGroup( token, Integer.decode(arg0)); } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + throw new RuntimeException(e); } return group; } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteSecurityService.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -17,6 +17,7 @@ * ##% */ package fr.cemagref.simexplorer.is.ui.web.services; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.service.AuthenticationService; /** @@ -28,8 +29,9 @@ * Gets the authentification service. * * @return the authentification service + * @throws SimExplorerException */ - public static AuthenticationService getAuthentificationService() { + public static AuthenticationService getAuthentificationService() throws SimExplorerException { return (AuthenticationService) getService("AuthenticationService"); } } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteService.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteService.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteService.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -25,15 +25,21 @@ import javax.naming.InitialContext; import javax.naming.NamingException; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerTechnicalException; /** * The Class RemoteService. */ public abstract class RemoteService { + /** The Constant PROVIDER_URL. */ private final static String PROVIDER_URL = "java.naming.provider.url"; + + /** The Constant FACTORY_INITIAL. */ private final static String FACTORY_INITIAL = "java.naming.factory.initial"; + + /** The Constant FACTORY_URL_PKGS. */ private final static String FACTORY_URL_PKGS = "java.naming.factory.url.pkgs"; /** The services. */ @@ -42,12 +48,12 @@ /** * Gets the service. * - * @param serviceName - * the service name + * @param serviceName the service name * * @return the service + * @throws SimExplorerException */ - protected static Object getService(String serviceName) { + protected static Object getService(String serviceName) throws SimExplorerException { Object service; if (!services.containsKey(serviceName)) { @@ -61,7 +67,7 @@ } services.put(serviceName, context.lookup(serviceName)); } catch (NamingException e) { - throw new SimExplorerWebException(e); + throw new SimExplorerTechnicalException(e); } } service = services.get(serviceName); @@ -69,10 +75,15 @@ return service; } + /** + * Inits the properties. + * + * @return the properties + */ protected static Properties initProperties() { Properties props = (Properties) System.getProperties().clone(); props.put(PROVIDER_URL, "jnp://localhost:1099"); - props.put(FACTORY_INITIAL,"org.jnp.interfaces.NamingContextFactory"); + props.put(FACTORY_INITIAL, "org.jnp.interfaces.NamingContextFactory"); props.put(FACTORY_URL_PKGS, "org.jnp.interfaces"); return props; } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteStorageService.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteStorageService.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/RemoteStorageService.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -17,6 +17,7 @@ * ##% */ package fr.cemagref.simexplorer.is.ui.web.services; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; import fr.cemagref.simexplorer.is.service.StorageService; import fr.cemagref.simexplorer.is.service.StorageServiceHelper; @@ -29,8 +30,9 @@ * Gets the storage service. * * @return the storage service + * @throws SimExplorerException */ - public static StorageService getStorageService() { + public static StorageService getStorageService() throws SimExplorerException { return (StorageService) getService(StorageServiceHelper.STORAGE_SERVICE_LOOKUP_NAME); } } Modified: trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java 2008-02-15 16:25:38 UTC (rev 1007) +++ trunk/simexplorer-is/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/UserValueEncoder.java 2008-02-15 17:03:52 UTC (rev 1008) @@ -20,8 +20,8 @@ import org.apache.tapestry.ValueEncoder; import fr.cemagref.simexplorer.is.exceptions.SimExplorerException; +import fr.cemagref.simexplorer.is.exceptions.SimExplorerTechnicalException; import fr.cemagref.simexplorer.is.security.entities.User; -import fr.cemagref.simexplorer.is.ui.web.SimExplorerWebException; /** * The Class UserValueEncoder. @@ -58,7 +58,7 @@ user = RemoteSecurityService.getAuthentificationService().getUser( token, Integer.decode(arg0)); } catch (SimExplorerException e) { - throw new SimExplorerWebException(e); + throw new RuntimeException(e); } return user; }
participants (1)
-
glandais@users.labs.libre-entreprise.org