class Command implements Serializable {

	public String getRelativeUri(String input) {
		// input doesn't have /p/ : prefix client/org/app/p/{domain-root} from incoming command 
		int iFirstQ = StringUtils.indexOf(input, "?");
		final String searchSeq = (iFirstQ != StringUtils.INDEX_NOT_FOUND) ? StringUtils.substring(input, 0, iFirstQ) : input;
		
		if(!StringUtils.contains(searchSeq, Constants.SEGMENT_PLATFORM_MARKER.code)) {
			String prefix = buildUri(Type.PlatformMarker) + getRootDomainUri();
			return prefix + input;
		}
		
		// input starts with /p/ : prefix client/org/app from incoming command
		if(StringUtils.startsWith(input, Constants.SEGMENT_PLATFORM_MARKER.code)) {
			String prefix = buildUri(Type.AppAlias);
			return prefix + input;
		}
		
		// input is complete: use as is
		return input;
	}

	public  Command(String absoluteUri);
	public  Command(Command source);

}