class DeploymentPathNormalizationImpl implements DeploymentPathNormalization {

    @Override
    public String normalizeDeploymentPath(String deploymentPath) {
        String deploymentSubPath = deploymentPath;
        if (deploymentSubPath.endsWith(AMSTSConstants.FORWARD_SLASH)) {
            deploymentSubPath = deploymentSubPath.substring(0, deploymentSubPath.lastIndexOf(AMSTSConstants.FORWARD_SLASH));
        }

        if (deploymentSubPath.startsWith(AMSTSConstants.FORWARD_SLASH)) {
            deploymentSubPath = deploymentSubPath.substring(1, deploymentSubPath.length());
        }

        return deploymentSubPath;
    }

}