public String convertPageStageToServerName(String stageName) throws RQLException {
java.util.List<PublishingTarget> targets = getPublishingTargets();
// find target by name starts with
PublishingTarget stageTarget = null;
for (int i = 0; i < targets.size(); i++) {
PublishingTarget target = targets.get(i);
if (target.getName().startsWith(stageName)) {
stageTarget = target;
}
}
// split and return middle name, if found