items.add(getPrefix()); items.add(docLoc.getServerName()); PathRef docRef = docLoc.getPathRef();
protected static String getDocumentPart(String requestedURL) { String docPart = ""; DocumentViewCodecManager documentViewCodecManager = Framework.getService(DocumentViewCodecManager.class); DocumentView docView = documentViewCodecManager.getDocumentViewFromUrl(requestedURL, false, null); if (docView != null) { DocumentLocation docLoc = docView.getDocumentLocation(); if (docLoc != null) { String serverName = docLoc.getServerName(); if (serverName != null) { docPart += serverName; IdRef idRef = docLoc.getIdRef(); PathRef pathRef = docLoc.getPathRef(); if (idRef != null) { docPart += "/id/" + idRef; } else if (pathRef != null) { docPart += "/path" + pathRef; } } } } return docPart; }