Added decoded base64
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/performfish-analytics-portlet@178532 82a268e6-3cf1-43bd-a215-b396298e98cfFeature/17249
parent
35302f698b
commit
1c80354d80
@ -1,4 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
lastWarOutDir=/home/francesco-mangiacrapa/eclipse-workspace/performfish-analytics-portlet-TRUNK/target/performfish-analytics-portlet-0.0.1-SNAPSHOT
|
||||
lastWarOutDir=/home/francesco-mangiacrapa/eclipse-workspace/performfish-analytics-portlet/target/performfish-analytics-portlet-0.1.0-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
@ -0,0 +1,30 @@
|
||||
package org.gcube.portlets.user.performfishanalytics.client.view.util;
|
||||
|
||||
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* The Class DecodeParameterUtil.
|
||||
*/
|
||||
public class DecodeParameterUtil {
|
||||
|
||||
/**
|
||||
* Base 64 decode.
|
||||
*
|
||||
* @param valueToDecode the value to decode
|
||||
* @return the long
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
public static String base64Decode(String valueToDecode) throws Exception{
|
||||
try {
|
||||
return b64decode(valueToDecode);
|
||||
}catch (Exception e) {
|
||||
throw new Exception("Error on decoding the parameter: "+ valueToDecode, e);
|
||||
}
|
||||
}
|
||||
|
||||
private static native String b64decode(String a) /*-{
|
||||
return window.atob(a);
|
||||
}-*/;
|
||||
|
||||
}
|
Loading…
Reference in New Issue