Пример #1
0
 /**
  * {@inheritDoc}
  *
  * @see org.prowim.dms.alfresco.ContentService#deleteContent(java.lang.String)
  */
 @Interceptors(AuthenticationInterceptor.class)
 public void deleteContent(String uuid) throws DMSException {
   Validate.notNull(uuid);
   this.getContentService();
   final Reference reference = new Reference(DMSStoreRegistry.STORE_REF, uuid, null);
   final Predicate predicate = new Predicate(new Reference[] {reference}, null, null);
   final CMLDelete delete = new CMLDelete(predicate);
   final CML cml = new CML();
   cml.setDelete(new CMLDelete[] {delete});
   try {
     WebServiceFactory.getRepositoryService().update(cml);
   } catch (RepositoryFault e) {
     String message = "Could not delete content: ";
     LOG.error(message, e);
     DMSFault dmsFault = new DMSFault();
     dmsFault.setMessage(message);
     throw new DMSException(message, dmsFault, e.getCause());
   } catch (RemoteException e) {
     String message = "Could not create connection: ";
     LOG.error(message, e);
     DMSFault dmsFault = new DMSFault();
     dmsFault.setMessage(message);
     throw new DMSException(message, dmsFault, e.getCause());
   }
 }