public static CmsCroppingParamBean parseImagePath(String selectedPath) {

        CmsCroppingParamBean result = null;
        int pos = selectedPath.indexOf(SCALE_PARAM_NAME + SCALE_PARAM_EQ);
        if (pos > -1) {
            // removing string part before the scaling parameter
            String param = selectedPath.substring(pos + SCALE_PARAM_NAME.length() + SCALE_PARAM_EQ.length());

            // removing string part after the scaling parameter
            pos = param.indexOf("&");
            if (pos > -1) {
                param = param.substring(0, pos);
            }
            result = parseScaleParam(param);
        } else {
            result = new CmsCroppingParamBean();
        }
        // look up format name if available
        pos = selectedPath.indexOf(SCALE_FORMAT_NAME_PARAM + SCALE_PARAM_EQ);
        if (pos > -1) {
            String param = selectedPath.substring(pos + SCALE_FORMAT_NAME_PARAM.length() + SCALE_PARAM_EQ.length());

            // removing string part after the scaling parameter
            pos = param.indexOf("&");
            if (pos > -1) {
                param = param.substring(0, pos);
            }
            result.setFormatName(param);
        }
        return result;
    }
public static CmsCroppingParamBean parseImagePath ( String selectedPath ) { CmsCroppingParamBean result = null ; int pos = selectedPath . indexOf ( SCALE_PARAM_NAME + SCALE_PARAM_EQ ) ; if ( pos > - 1 ) { String param = selectedPath . substring ( pos + SCALE_PARAM_NAME . length ( ) + SCALE_PARAM_EQ . length ( ) ) ; pos = param . indexOf ( "&" ) ; if ( pos > - 1 ) { param = param . substring ( 0 , pos ) ; } result = parseScaleParam ( param ) ; } else { result = new CmsCroppingParamBean ( ) ; } pos = selectedPath . indexOf ( SCALE_FORMAT_NAME_PARAM + SCALE_PARAM_EQ ) ; if ( pos > - 1 ) { String param = selectedPath . substring ( pos + SCALE_FORMAT_NAME_PARAM . length ( ) + SCALE_PARAM_EQ . length ( ) ) ; pos = param . indexOf ( "&" ) ; if ( pos > - 1 ) { param = param . substring ( 0 , pos ) ; } result . setFormatName ( param ) ; } return result ; }
Parses an image scale parameter and returns the parsed data.<p>

@param selectedPath the image path including the scale parameter

@return the cropping data