public void setRetentionProperties(String path, String mode, String fromDate, String toDate) throws RemoteException, PropertiesAdminServiceRegistryExceptionException { RetentionBean retentionBean = new RetentionBean(); retentionBean.setWriteLocked(mode.contains("write")); retentionBean.setDeleteLocked(mode.contains("delete")); retentionBean.setFromDate(fromDate); retentionBean.setToDate(toDate); try { propertiesAdminServiceStub.setRetentionProperties(path, retentionBean); } catch (RemoteException e) { log.error("Set retention properties failed ", e); throw new RemoteException("Set retention properties failed ", e); } catch (PropertiesAdminServiceRegistryExceptionException e) { log.error("Set retention lock failed ", e); throw new PropertiesAdminServiceRegistryExceptionException("Set retention properties failed ", e); } }
public boolean setRetentionProperties(String path, String mode, String fromDate, String toDate) throws RemoteException, PropertiesAdminServiceRegistryExceptionException { RetentionBean retentionBean = new RetentionBean(); retentionBean.setWriteLocked(mode.contains("write")); retentionBean.setDeleteLocked(mode.contains("delete")); retentionBean.setFromDate(fromDate); retentionBean.setToDate(toDate); return propertiesAdminServiceStub.setRetentionProperties(path, retentionBean); }
/** * Method to set resource retention properties of a resource. * * @param request Http request with parameters. * @throws RegistryException throws if there is an error */ public boolean setRetentionProperties(HttpServletRequest request) throws RegistryException { String path = request.getParameter(PATH); try { RetentionBean bean; String fromDate = request.getParameter("fromDate"); if (fromDate == null || "".equals(fromDate)) { bean = null; } else { bean = new RetentionBean(); bean.setFromDate(fromDate); bean.setToDate(request.getParameter("toDate")); String lockedOperationsParam = request.getParameter("lockedOperations"); bean.setWriteLocked(lockedOperationsParam.contains("write")); bean.setDeleteLocked(lockedOperationsParam.contains("delete")); } propertAdminServicestub.setRetentionProperties(path, bean); } catch (RemoteException | PropertiesAdminServiceRegistryExceptionException e) { throw new RegistryException("Failed to add retention to resource at path" + path, e); } return true; }
public void setRetentionProperties(String path, String mode, String fromDate, String toDate) throws RemoteException, PropertiesAdminServiceRegistryExceptionException { RetentionBean retentionBean = new RetentionBean(); retentionBean.setWriteLocked(mode.contains("write")); retentionBean.setDeleteLocked(mode.contains("delete")); retentionBean.setFromDate(fromDate); retentionBean.setToDate(toDate); try { propertiesAdminServiceStub.setRetentionProperties(path, retentionBean); } catch (RemoteException e) { log.error("Set retention properties failed ", e); throw new RemoteException("Set retention properties failed ", e); } catch (PropertiesAdminServiceRegistryExceptionException e) { log.error("Set retention lock failed ", e); throw new PropertiesAdminServiceRegistryExceptionException("Set retention properties failed ", e); } }
public boolean setRetentionProperties(String path, String mode, String fromDate, String toDate) throws RemoteException, PropertiesAdminServiceRegistryExceptionException { RetentionBean retentionBean = new RetentionBean(); retentionBean.setWriteLocked(mode.contains("write")); retentionBean.setDeleteLocked(mode.contains("delete")); retentionBean.setFromDate(fromDate); retentionBean.setToDate(toDate); try { return propertiesAdminServiceStub.setRetentionProperties(path, retentionBean); } catch (RemoteException e) { log.error("Set retention properties failed ", e); throw new RemoteException("Set retention properties failed ", e); } catch (PropertiesAdminServiceRegistryExceptionException e) { log.error("Set retention lock failed ", e); throw new PropertiesAdminServiceRegistryExceptionException("Set retention properties failed ", e); } }
object.setToDate( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));