ch.software_atelier.simpleflex.rest.RestHlp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleflex-rest Show documentation
Show all versions of simpleflex-rest Show documentation
REST Extension for the simpleflex-base webserver
package ch.software_atelier.simpleflex.rest;
import ch.software_atelier.simpleflex.Request;
import ch.software_atelier.simpleflex.Utils;
import java.util.List;
public class RestHlp {
public static List getResourceNodes(Request r, String appName){
String resourcePath = r.getReqestString();
if (appName.length() > 0){
resourcePath = resourcePath.substring(appName.length()+2);
}
else{
resourcePath = resourcePath.substring(1);
}
if (resourcePath.endsWith("/")){
resourcePath = resourcePath.substring(0, resourcePath.length()-1);
}
return Utils.tokenize(resourcePath, "/");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy