Beispiel #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());
   }
 }
 /**
  * Muestra los store de alfresco por la salida estandar
  *
  * @return
  * @throws
  */
 public static void getStores() {
   RepositoryServiceSoapBindingStub repoService = WebServiceFactory.getRepositoryService();
   Store[] stores;
   try {
     stores = repoService.getStores();
     for (Store s : stores) {
       System.out.println(s.getScheme() + "://" + s.getAddress());
     }
   } catch (RepositoryFault e) {
     e.printStackTrace();
   } catch (RemoteException e) {
     e.printStackTrace();
   }
 }