| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>AttachmentManager (Apache JSPWiki 2.12.2-SNAPSHOT API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="AttachmentManager (Apache JSPWiki 2.12.2-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":18,"i6":18,"i7":18,"i8":6,"i9":6,"i10":18,"i11":6,"i12":6,"i13":6,"i14":6,"i15":18,"i16":6,"i17":18,"i18":6,"i19":6,"i20":1}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AttachmentManager.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.wiki.attachment</a></div> |
| <h2 title="Interface AttachmentManager" class="title">Interface AttachmentManager</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><code><a href="DefaultAttachmentManager.html" title="class in org.apache.wiki.attachment">DefaultAttachmentManager</a></code></dd> |
| </dl> |
| <hr> |
| <object type="image/svg+xml" data="AttachmentManager.svg" style="max-width:60%;float:right;"></object> |
| <pre style="white-space:pre-wrap;">public interface <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.47">AttachmentManager</a></pre> |
| <div class="block">Provides facilities for handling attachments. All attachment handling goes through this class. |
| <p> |
| The AttachmentManager provides a facade towards the current WikiAttachmentProvider that is in use. |
| It is created by the Engine as a singleton object, and can be requested through the Engine.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.9.28</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary" style="clear:right;"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROP_ALLOWEDEXTENSIONS">PROP_ALLOWEDEXTENSIONS</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">A space-separated list of attachment types which can be uploaded</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROP_FORBIDDENEXTENSIONS">PROP_FORBIDDENEXTENSIONS</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">A space-separated list of attachment types which cannot be uploaded</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROP_FORCEDOWNLOAD">PROP_FORCEDOWNLOAD</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">A space-separated list of attachment types which will never open in the browser.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROP_MAXSIZE">PROP_MAXSIZE</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The maximum size of attachments that can be uploaded.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROP_PROVIDER">PROP_PROVIDER</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">The property name for defining the attachment provider class name.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#PROP_PROVIDER_DEPRECATED">PROP_PROVIDER_DEPRECATED</a></span></code></th> |
| <td class="colLast"> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span></div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#attachmentsEnabled()">attachmentsEnabled</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true, if attachments are enabled and running.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deleteAttachment(org.apache.wiki.api.core.Attachment)">deleteAttachment</a></span>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att)</code></th> |
| <td class="colLast"> |
| <div class="block">Deletes all versions of the given attachment.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deleteVersion(org.apache.wiki.api.core.Attachment)">deleteVersion</a></span>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att)</code></th> |
| <td class="colLast"> |
| <div class="block">Deletes the given attachment version.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#forceDownload(java.lang.String)">forceDownload</a></span>​(java.lang.String name)</code></th> |
| <td class="colLast"> |
| <div class="block">Check if attachement link should force a download iso opening the attachment in the browser.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>java.util.Collection<<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAllAttachments()">getAllAttachments</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a collection of Attachments, containing each and every attachment that is in this Wiki.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>default <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentInfo(java.lang.String)">getAttachmentInfo</a></span>​(java.lang.String name)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets info on a particular attachment, latest version.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>default <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentInfo(java.lang.String,int)">getAttachmentInfo</a></span>​(java.lang.String name, |
| int version)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets info on a particular attachment with the given version.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>default <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentInfo(org.apache.wiki.api.core.Context,java.lang.String)">getAttachmentInfo</a></span>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> context, |
| java.lang.String attachmentname)</code></th> |
| <td class="colLast"> |
| <div class="block">Figures out the full attachment name from the context and attachment name.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentInfo(org.apache.wiki.api.core.Context,java.lang.String,int)">getAttachmentInfo</a></span>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> context, |
| java.lang.String attachmentname, |
| int version)</code></th> |
| <td class="colLast"> |
| <div class="block">Figures out the full attachment name from the context and attachment name.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentInfoName(org.apache.wiki.api.core.Context,java.lang.String)">getAttachmentInfoName</a></span>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> context, |
| java.lang.String attachmentname)</code></th> |
| <td class="colLast"> |
| <div class="block">Figures out the full attachment name from the context and attachment name.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>default java.io.InputStream</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentStream(org.apache.wiki.api.core.Attachment)">getAttachmentStream</a></span>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds a (real) attachment from the repository as an <code>InputStream</code>.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>java.io.InputStream</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAttachmentStream(org.apache.wiki.api.core.Context,org.apache.wiki.api.core.Attachment)">getAttachmentStream</a></span>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> ctx, |
| <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an attachment stream using the particular WikiContext.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../api/providers/AttachmentProvider.html" title="interface in org.apache.wiki.api.providers">AttachmentProvider</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentProvider()">getCurrentProvider</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the current attachment provider.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="DynamicAttachment.html" title="class in org.apache.wiki.attachment">DynamicAttachment</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDynamicAttachment(java.lang.String)">getDynamicAttachment</a></span>​(java.lang.String name)</code></th> |
| <td class="colLast"> |
| <div class="block">Finds a DynamicAttachment.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>java.util.List<<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getVersionHistory(java.lang.String)">getVersionHistory</a></span>​(java.lang.String attachmentName)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a list of versions of the attachment.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>default boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasAttachments(org.apache.wiki.api.core.Page)">hasAttachments</a></span>​(<a href="../api/core/Page.html" title="interface in org.apache.wiki.api.core">Page</a> wikipage)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true, if the page has any attachments at all.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>java.util.List<<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#listAttachments(org.apache.wiki.api.core.Page)">listAttachments</a></span>​(<a href="../api/core/Page.html" title="interface in org.apache.wiki.api.core">Page</a> wikipage)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the list of attachments associated with a given wiki page.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>default void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#storeAttachment(org.apache.wiki.api.core.Attachment,java.io.File)">storeAttachment</a></span>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att, |
| java.io.File source)</code></th> |
| <td class="colLast"> |
| <div class="block">Stores an attachment that lives in the given file.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#storeAttachment(org.apache.wiki.api.core.Attachment,java.io.InputStream)">storeAttachment</a></span>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att, |
| java.io.InputStream in)</code></th> |
| <td class="colLast"> |
| <div class="block">Stores an attachment directly from a stream.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#storeDynamicAttachment(org.apache.wiki.api.core.Context,org.apache.wiki.attachment.DynamicAttachment)">storeDynamicAttachment</a></span>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> ctx, |
| <a href="DynamicAttachment.html" title="class in org.apache.wiki.attachment">DynamicAttachment</a> att)</code></th> |
| <td class="colLast"> |
| <div class="block">Stores a dynamic attachment.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#validateFileName(java.lang.String)">validateFileName</a></span>​(java.lang.String filename)</code></th> |
| <td class="colLast"> |
| <div class="block">Validates the filename and makes sure it is legal.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="PROP_PROVIDER"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>PROP_PROVIDER</h4> |
| <pre>static final java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.50">PROP_PROVIDER</a></pre> |
| <div class="block">The property name for defining the attachment provider class name.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.wiki.attachment.AttachmentManager.PROP_PROVIDER">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="PROP_PROVIDER_DEPRECATED"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>PROP_PROVIDER_DEPRECATED</h4> |
| <pre>@Deprecated |
| static final java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.53">PROP_PROVIDER_DEPRECATED</a></pre> |
| <div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> |
| <div class="block">The property name for defining the attachment provider class name.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.wiki.attachment.AttachmentManager.PROP_PROVIDER_DEPRECATED">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="PROP_MAXSIZE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>PROP_MAXSIZE</h4> |
| <pre>static final java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.56">PROP_MAXSIZE</a></pre> |
| <div class="block">The maximum size of attachments that can be uploaded.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.wiki.attachment.AttachmentManager.PROP_MAXSIZE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="PROP_ALLOWEDEXTENSIONS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>PROP_ALLOWEDEXTENSIONS</h4> |
| <pre>static final java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.59">PROP_ALLOWEDEXTENSIONS</a></pre> |
| <div class="block">A space-separated list of attachment types which can be uploaded</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.wiki.attachment.AttachmentManager.PROP_ALLOWEDEXTENSIONS">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="PROP_FORBIDDENEXTENSIONS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>PROP_FORBIDDENEXTENSIONS</h4> |
| <pre>static final java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.62">PROP_FORBIDDENEXTENSIONS</a></pre> |
| <div class="block">A space-separated list of attachment types which cannot be uploaded</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.wiki.attachment.AttachmentManager.PROP_FORBIDDENEXTENSIONS">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="PROP_FORCEDOWNLOAD"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>PROP_FORCEDOWNLOAD</h4> |
| <pre>static final java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.65">PROP_FORCEDOWNLOAD</a></pre> |
| <div class="block">A space-separated list of attachment types which will never open in the browser.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.wiki.attachment.AttachmentManager.PROP_FORCEDOWNLOAD">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="attachmentsEnabled()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>attachmentsEnabled</h4> |
| <pre class="methodSignature">boolean <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.72">attachmentsEnabled</a>()</pre> |
| <div class="block">Returns true, if attachments are enabled and running.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A boolean value indicating whether attachment functionality is enabled.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentInfo(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentInfo</h4> |
| <pre class="methodSignature">default <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.81">getAttachmentInfo</a>​(java.lang.String name) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Gets info on a particular attachment, latest version.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - A full attachment name.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Attachment, or null, if no such attachment exists.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something goes wrong.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentInfo(java.lang.String,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentInfo</h4> |
| <pre class="methodSignature">default <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.94">getAttachmentInfo</a>​(java.lang.String name, |
| int version) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Gets info on a particular attachment with the given version.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - A full attachment name.</dd> |
| <dd><code>version</code> - A version number.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Attachment, or null, if no such attachment or version exists.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something goes wrong.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentInfo(org.apache.wiki.api.core.Context,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentInfo</h4> |
| <pre class="methodSignature">default <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.110">getAttachmentInfo</a>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> context, |
| java.lang.String attachmentname) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Figures out the full attachment name from the context and attachment name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - The current WikiContext</dd> |
| <dd><code>attachmentname</code> - The file name of the attachment.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Attachment, or null, if no such attachment exists.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something goes wrong.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentInfo(org.apache.wiki.api.core.Context,java.lang.String,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentInfo</h4> |
| <pre class="methodSignature"><a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.123">getAttachmentInfo</a>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> context, |
| java.lang.String attachmentname, |
| int version) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Figures out the full attachment name from the context and attachment name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - The current WikiContext</dd> |
| <dd><code>attachmentname</code> - The file name of the attachment.</dd> |
| <dd><code>version</code> - A particular version.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Attachment, or null, if no such attachment or version exists.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something goes wrong.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentInfoName(org.apache.wiki.api.core.Context,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentInfoName</h4> |
| <pre class="methodSignature">java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.132">getAttachmentInfoName</a>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> context, |
| java.lang.String attachmentname)</pre> |
| <div class="block">Figures out the full attachment name from the context and attachment name.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>context</code> - The current WikiContext</dd> |
| <dd><code>attachmentname</code> - The file name of the attachment.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Attachment, or null, if no such attachment exists.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="listAttachments(org.apache.wiki.api.core.Page)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>listAttachments</h4> |
| <pre class="methodSignature">java.util.List<<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a>> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.141">listAttachments</a>​(<a href="../api/core/Page.html" title="interface in org.apache.wiki.api.core">Page</a> wikipage) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Returns the list of attachments associated with a given wiki page. If there are no attachments, returns an empty Collection.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>wikipage</code> - The wiki page from which you are seeking attachments for.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a valid collection of attachments.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If there was something wrong in the backend.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="hasAttachments(org.apache.wiki.api.core.Page)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasAttachments</h4> |
| <pre class="methodSignature">default boolean <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.149">hasAttachments</a>​(<a href="../api/core/Page.html" title="interface in org.apache.wiki.api.core">Page</a> wikipage)</pre> |
| <div class="block">Returns true, if the page has any attachments at all. This is a convenience method.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>wikipage</code> - The wiki page from which you are seeking attachments for.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>True, if the page has attachments, else false.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="forceDownload(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>forceDownload</h4> |
| <pre class="methodSignature">boolean <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.166">forceDownload</a>​(java.lang.String name)</pre> |
| <div class="block">Check if attachement link should force a download iso opening the attachment in the browser.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - Name of attachment to be checked</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true, if the attachment should be downloaded when clicking the link</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.11.0 M4</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentStream(org.apache.wiki.api.core.Attachment)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentStream</h4> |
| <pre class="methodSignature">default java.io.InputStream <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.176">getAttachmentStream</a>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att) |
| throws java.io.IOException, |
| <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Finds a (real) attachment from the repository as an <code>InputStream</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>att</code> - Attachment</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>An InputStream to read from. May return null, if attachments are disabled.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - If the stream cannot be opened</dd> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If the backend fails due to some other reason.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAttachmentStream(org.apache.wiki.api.core.Context,org.apache.wiki.api.core.Attachment)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAttachmentStream</h4> |
| <pre class="methodSignature">java.io.InputStream <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.190">getAttachmentStream</a>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> ctx, |
| <a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a>, |
| java.io.IOException</pre> |
| <div class="block">Returns an attachment stream using the particular WikiContext. This method should be used instead of |
| <a href="#getAttachmentStream(org.apache.wiki.api.core.Attachment)"><code>getAttachmentStream(Attachment)</code></a>, since it also allows the DynamicAttachments to function.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ctx</code> - The Wiki Context</dd> |
| <dd><code>att</code> - The Attachment to find</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>An InputStream. May return null, if attachments are disabled. You must take care of closing it.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If the backend fails due to some reason</dd> |
| <dd><code>java.io.IOException</code> - If the stream cannot be opened</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="storeDynamicAttachment(org.apache.wiki.api.core.Context,org.apache.wiki.attachment.DynamicAttachment)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>storeDynamicAttachment</h4> |
| <pre class="methodSignature">void <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.198">storeDynamicAttachment</a>​(<a href="../api/core/Context.html" title="interface in org.apache.wiki.api.core">Context</a> ctx, |
| <a href="DynamicAttachment.html" title="class in org.apache.wiki.attachment">DynamicAttachment</a> att)</pre> |
| <div class="block">Stores a dynamic attachment. Unlike storeAttachment(), this just stores the attachment in the memory.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ctx</code> - A WikiContext</dd> |
| <dd><code>att</code> - An attachment to store</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getDynamicAttachment(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDynamicAttachment</h4> |
| <pre class="methodSignature"><a href="DynamicAttachment.html" title="class in org.apache.wiki.attachment">DynamicAttachment</a> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.208">getDynamicAttachment</a>​(java.lang.String name)</pre> |
| <div class="block">Finds a DynamicAttachment. Normally, you should just use <a href="#getAttachmentInfo(java.lang.String)"><code>getAttachmentInfo(String)</code></a> , since that will find also |
| <a href="DynamicAttachment.html" title="class in org.apache.wiki.attachment"><code>DynamicAttachment</code></a>s.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - The name of the attachment to look for</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>An Attachment, or null.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#getAttachmentInfo(java.lang.String)"><code>getAttachmentInfo(String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="storeAttachment(org.apache.wiki.api.core.Attachment,java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>storeAttachment</h4> |
| <pre class="methodSignature">default void <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.220">storeAttachment</a>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att, |
| java.io.File source) |
| throws java.io.IOException, |
| <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Stores an attachment that lives in the given file. If the attachment did not exist previously, this method will create it. |
| If it did exist, it stores a new version.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>att</code> - Attachment to store this under.</dd> |
| <dd><code>source</code> - A file to read from.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - If writing the attachment failed.</dd> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something else went wrong.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="storeAttachment(org.apache.wiki.api.core.Attachment,java.io.InputStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>storeAttachment</h4> |
| <pre class="methodSignature">void <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.235">storeAttachment</a>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att, |
| java.io.InputStream in) |
| throws java.io.IOException, |
| <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Stores an attachment directly from a stream. If the attachment did not exist previously, this method will create it. |
| If it did exist, it stores a new version.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>att</code> - Attachment to store this under.</dd> |
| <dd><code>in</code> - InputStream from which the attachment contents will be read.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - If writing the attachment failed.</dd> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something else went wrong.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getVersionHistory(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVersionHistory</h4> |
| <pre class="methodSignature">java.util.List<<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a>> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.246">getVersionHistory</a>​(java.lang.String attachmentName) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Returns a list of versions of the attachment.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>attachmentName</code> - A fully qualified name of the attachment.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A list of Attachments. May return null, if attachments are |
| disabled.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If the provider fails for some reason.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getAllAttachments()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAllAttachments</h4> |
| <pre class="methodSignature">java.util.Collection<<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a>> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.254">getAllAttachments</a>() |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Returns a collection of Attachments, containing each and every attachment that is in this Wiki.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A collection of attachments. If attachments are disabled, will return an empty collection.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something went wrong with the backend</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getCurrentProvider()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCurrentProvider</h4> |
| <pre class="methodSignature"><a href="../api/providers/AttachmentProvider.html" title="interface in org.apache.wiki.api.providers">AttachmentProvider</a> <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.261">getCurrentProvider</a>()</pre> |
| <div class="block">Returns the current attachment provider.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The current provider. May be null, if attachments are disabled.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="deleteVersion(org.apache.wiki.api.core.Attachment)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deleteVersion</h4> |
| <pre class="methodSignature">void <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.269">deleteVersion</a>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Deletes the given attachment version.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>att</code> - The attachment to delete</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - If something goes wrong with the backend.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="deleteAttachment(org.apache.wiki.api.core.Attachment)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>deleteAttachment</h4> |
| <pre class="methodSignature">void <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.277">deleteAttachment</a>​(<a href="../api/core/Attachment.html" title="interface in org.apache.wiki.api.core">Attachment</a> att) |
| throws <a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></pre> |
| <div class="block">Deletes all versions of the given attachment.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>att</code> - The Attachment to delete.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/ProviderException.html" title="class in org.apache.wiki.api.exceptions">ProviderException</a></code> - if something goes wrong with the backend.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="validateFileName(java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>validateFileName</h4> |
| <pre class="methodSignature">static java.lang.String <a href="../../../../src-html/org/apache/wiki/attachment/AttachmentManager.html#line.286">validateFileName</a>​(java.lang.String filename) |
| throws <a href="../api/exceptions/WikiException.html" title="class in org.apache.wiki.api.exceptions">WikiException</a></pre> |
| <div class="block">Validates the filename and makes sure it is legal. It trims and splits and replaces bad characters.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>filename</code> - file name to validate.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A validated name with annoying characters replaced.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../api/exceptions/WikiException.html" title="class in org.apache.wiki.api.exceptions">WikiException</a></code> - If the filename is not legal (e.g. empty)</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AttachmentManager.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright (c) 2001-2023 The Apache Software Foundation. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |