public MetadataBean getMetadata(String resourcePath) throws RemoteException, ResourceAdminServiceExceptionException { return resourceAdminServiceStub.getMetadata(resourcePath); }
public MetadataBean getMetadata(String resourcePath) throws RemoteException, ResourceAdminServiceExceptionException { return resourceAdminServiceStub.getMetadata(resourcePath); }
public MetadataBean getMetadata(String resourcePath) throws RemoteException, ResourceAdminServiceExceptionException { return resourceAdminServiceStub.getMetadata(resourcePath); }
public MetadataBean getMetadata(String resourcePath) throws RemoteException, ResourceAdminServiceExceptionException { return resourceAdminServiceStub.getMetadata(resourcePath); }
public MetadataBean getMetadata(String resourcePath) throws RemoteException, ResourceAdminServiceExceptionException { return resourceAdminServiceStub.getMetadata(resourcePath); }
public MetadataBean getMetadata(String resourcePath) throws RemoteException, ResourceAdminServiceExceptionException { return resourceAdminServiceStub.getMetadata(resourcePath); }
public MetadataBean getMetadata(String path) throws Exception { if (path == null) { path = RegistryConstants.ROOT_PATH; } MetadataBean bean = null; try { bean = stub.getMetadata(path); } catch (Exception e) { String msg = "Failed to get resource metadata from the resource service. " + e.getMessage(); log.error(msg, e); throw e; } return bean; }
public MetadataBean getMetadata(HttpServletRequest request,String root) throws Exception { String path = RegistryConstants.ROOT_PATH; request.setAttribute("path", path); if (path == null) { path = getSessionResourcePath(); if (path == null) { path = RegistryConstants.ROOT_PATH; } } MetadataBean bean = null; try { bean = stub.getMetadata(path); } catch (Exception e) { String msg = "Failed to get resource metadata from the resource service. " + e.getMessage(); log.error(msg, e); throw e; } return bean; } public void setDescription(String path, String description) throws Exception {
public MetadataBean getMetadata(HttpServletRequest request) throws Exception { String path = RegistryUtil.getPath(request); if (path == null) { path = getSessionResourcePath(); if (path == null) { path = RegistryConstants.ROOT_PATH; } request.setAttribute("path", path); } MetadataBean bean = null; try { bean = stub.getMetadata(path); } catch (Exception e) { String msg = "Failed to get resource metadata from the resource service. " + e.getMessage(); log.error(msg, e); throw e; } return bean; }
public void updateTextContent(String resourcePath, String contentText,String updateOverride,String resourceVersion) throws Exception { try { MetadataBean metadataBean = stub.getMetadata(resourcePath); if(CommonUtil.isLatestVersion(resourceVersion, metadataBean.getResourceVersion()) || updateOverride.equals("true")){ stub.updateTextContent(resourcePath, contentText); }else{ throw new RegistryException("Another user has already modified this resource"); } } catch (Exception e) { String msg = "Failed to update text content of the resource " + resourcePath + ". " + e.getMessage(); log.error(msg, e); throw e; } }
public String getTextContent(HttpServletRequest request) throws Exception { String path = RegistryUtil.getPath(request); if (path != null && path.contains("..")) { path = FilenameUtils.normalize(path); } String textContent = null; try { textContent = stub.getTextContent(path); MetadataBean metadataBean = stub.getMetadata(path); String resourceVersion = metadataBean.getResourceVersion(); request.getSession().setAttribute("resourceVersion",resourceVersion); } catch (Exception e) { String msg = "Failed get text content of the resource " + path + ". " + e.getMessage(); log.error(msg, e); throw e; } return textContent; }