<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Mon May 20 06:29:43 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.couchbase.com/issues/si/jira.issueviews:issue-xml/CBMA-19/CBMA-19.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Couchbase</title>
    <link>http://www.couchbase.com/issues</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.4</version>
        <build-number>845</build-number>
        <build-date>26-12-2012</build-date>
    </build-info>

<item>
            <title>[CBMA-19] Need API for external path to CouchbaseMobile</title>
                <link>http://www.couchbase.com/issues/browse/CBMA-19</link>
                <project id="10043" key="CBMA">Couchbase Mobile Android</project>
                        <description>A request for a small improvement for your Android API: You offer a method CouchbaseMobile.externalPath() to get the external path for Couchbase Mobile. We have implemented some kind of quota control that limits the used diskspace, so we need to find out the path where CouchDB stores its database files. Unfortunately this is a sub-folder of the one returned by externalPath(). We implemented a method on our own that returns new File(externalPath(), &amp;quot;/db/&amp;quot;); but that should be included in your CouchbaseMobile class (name of db folder could be changed) and used by CouchbaseMobile.installDatabase(String) as well.</description>
                <environment></environment>
            <key id="15516">CBMA-19</key>
            <summary>Need API for external path to CouchbaseMobile</summary>
                <type id="4" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="4" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="2">Won&apos;t Fix</resolution>
                                <assignee username="-1">Unassigned</assignee>
                                <reporter username="perry">Perry Krug</reporter>
                        <labels>
                    </labels>
                <created>Mon, 31 Oct 2011 18:31:42 -0500</created>
                <updated>Mon, 15 Oct 2012 09:49:49 -0500</updated>
                    <resolved>Mon, 15 Oct 2012 09:49:49 -0500</resolved>
                            <version>2.0-beta</version>
                                                <component>SDK</component>
                                <votes>0</votes>
                        <watches>0</watches>
                                                    <comments>
                    <comment id="22504" author="jchrisa" created="Tue, 1 Nov 2011 17:44:27 -0500"  >Will it work to execute this request against the running server? &lt;br/&gt;
&lt;br/&gt;
GET /_config/couchdb/database_dir&lt;br/&gt;
&lt;br/&gt;
This is the single point of truth for the answer you seek, so our API would just be querying this anyway:&lt;br/&gt;
&lt;br/&gt;
</comment>
                    <comment id="22548" author="perry" created="Fri, 4 Nov 2011 21:01:52 -0500"  >This works but implementing an asynchronous HTTP-GET with parsing afterwards and additional error handling would not be appropriate for only getting this directory. So far we have a working solution but we want the one-liner I suggested on your side rather than on our side because you might want to change the name of the &#8220;db&#8221;-subfolder for some reason.</comment>
                    <comment id="22678" author="perry" created="Wed, 16 Nov 2011 10:38:09 -0600"  >This is what is desired:&lt;br/&gt;
Class CouchbaseMobile:&lt;br/&gt;
&amp;nbsp;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public static File databaseDir() {&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return new File(externalPath(), &amp;quot;db&amp;quot;);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&lt;br/&gt;
And its usage in CouchbaseMobile.installDatabase():&lt;br/&gt;
&amp;nbsp;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void installDatabase(String fileName) throws IOException {&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;File destination = new File(databaseDir(), fileName);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;copyIffNotExists(fileName, destination);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}</comment>
                    <comment id="22690" author="jchrisa" created="Wed, 16 Nov 2011 13:59:06 -0600"  >A better option would be to create a generic config API access layer in Java. I think this is properly done in Ektorp, so that we don&amp;#39;t end up shipping an HTTP client as part of the default Couchbase Mobile package. Having that HTTP client in there would invite disaster as folks would start to use it for their primary access and then we&amp;#39;d start to have to support it.&lt;br/&gt;
&lt;br/&gt;
Chris</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                                                                                                                                                    <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>11324</customfieldvalue>
                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10181" key="com.atlassian.jira.ext.charting:timeinstatus">
                <customfieldname>Time In Status</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                </customfields>
    </item>
</channel>
</rss>