Exemplo n.º 1
0
  public void commitResource(ContentResourceEdit edit) throws ServerOverloadException {
    // keep the body out of the XML

    boolean goin = in();
    try {
      if (resolver != null && goin) {
        resolver.commitResource(edit);
      } else {
        BaseResourceEdit redit = (BaseResourceEdit) edit;

        if (redit.m_contentStream != null) {

        } else if (redit.m_body != null) {

        } else {

        }
        m_resourceStore.commitResource(edit);
      }
      resourceCache.remove(edit.getId());

    } finally {
      out();
    }
  }
Exemplo n.º 2
0
 /** update xml and store the body of file TODO storing of body content is not used now. */
 public void commitDeleteResource(ContentResourceEdit edit, String uuid) {
   resourceCache.remove(edit.getId());
   boolean goin = in();
   try {
     if (resolver != null && goin) {
       resolver.commitDeleteResource(edit, uuid);
     } else {
       m_resourceDeleteStore.commitDeleteResource(edit, uuid);
     }
   } finally {
     out();
   }
 }
Exemplo n.º 3
0
  public void removeResource(ContentResourceEdit edit) {
    // delete the body
    boolean goin = in();
    try {
      if (resolver != null && goin) {
        resolver.removeResource(edit);
      } else {

        m_resourceStore.removeResource(edit);
      }
      resourceCache.remove(edit.getId());

    } finally {
      out();
    }
  }
Exemplo n.º 4
0
 public void cancelResource(ContentResourceEdit edit) {
   boolean goin = in();
   try {
     if (resolver != null && goin) {
       resolver.cancelResource(edit);
     } else {
       // clear the memory image of the body
       byte[] body = ((BaseResourceEdit) edit).m_body;
       ((BaseResourceEdit) edit).m_body = null;
       m_resourceStore.cancelResource(edit);
     }
     resourceCache.remove(edit.getId());
   } finally {
     out();
   }
 }