Tabnine Logo
AttachmentManager.removeAttachmentFromServer
Code IndexAdd Tabnine to your IDE (free)

How to use
removeAttachmentFromServer
method
in
com.atlassian.confluence.pages.AttachmentManager

Best Java code snippets using com.atlassian.confluence.pages.AttachmentManager.removeAttachmentFromServer (Showing top 4 results out of 315)

origin: com.atlassian.confluence.extra.webdav/webdav-plugin

public void execute() throws Exception {
  Page page = pageManager.getPage(getContainingPageId());
  if (null != page) {
    Attachment attachment = attachmentManager.getAttachment(page, getFileName());
    if (null != attachment)
      attachmentManager.removeAttachmentFromServer(attachment);
  }
}
origin: com.atlassian.confluence.extra.webdav/webdav-plugin

} finally {
  IOUtils.closeQuietly(attachmentInput);
  getAttachmentManager().removeAttachmentFromServer(attachment);
origin: com.atlassian.confluence.extra.chart/chart-plugin

attachmentManager.removeAttachmentFromServer(theAttachment);
theAttachment = null;
origin: com.atlassian.confluence.extra.webdav/webdav-plugin

public void removeMember(DavResource davResource) throws DavException {
  String[] pathComponents = StringUtils.split(davResource.getResourcePath(), '/');
  String resourceName = pathComponents[pathComponents.length - 1];
  Space thisSpace = getSpace();
  User user = AuthenticatedUserThreadLocal.getUser();
  if (isResourceSpaceDescription(thisSpace, resourceName)) {
    if (permissionManager.hasPermission(user, Permission.EDIT, thisSpace))
      ((ConfluenceDavSession) getSession()).getResourceStates().hideSpaceDescription(thisSpace);
    else
      throw new DavException(HttpServletResponse.SC_FORBIDDEN, "No permission to edit " + thisSpace);
  } else {
    Page pageToRemove = pageManager.getPage(thisSpace.getKey(), resourceName);
    if (null == pageToRemove) {
      ContentEntityObject spaceDesc = getSpace().getDescription();
      Attachment attachmentToRemove = attachmentManager.getAttachment(spaceDesc, resourceName);
      if (null != attachmentToRemove) {
        attachmentManager.removeAttachmentFromServer(attachmentToRemove);
      }
    } else {
      if (permissionManager.hasPermission(
          AuthenticatedUserThreadLocal.getUser(),
          Permission.REMOVE,
          pageToRemove)) {
        pageManager.trashPage(pageToRemove);
      } else {
        throw new DavException(HttpServletResponse.SC_FORBIDDEN, "Forbidden to delete " + pageToRemove);
      }
    }
  }
}
com.atlassian.confluence.pagesAttachmentManagerremoveAttachmentFromServer

Popular methods of AttachmentManager

  • getAttachment
  • getAttachmentData
  • getLatestVersionsOfAttachments
  • saveAttachment
  • moveAttachment

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now