@Test public void getLastRevision() throws TTException { assertEquals(ASSEQUALS, 1, treetank.getLastRevision(CoreTestHelper.RESOURCENAME)); final NodeIdRepresentation rid = new NodeIdRepresentation( CoreTestHelper.getStorage(CoreTestHelper.PATHS.PATH1.getFile())); rid.deleteResource(CoreTestHelper.RESOURCENAME, 8); assertEquals(ASSEQUALS, 2, treetank.getLastRevision(CoreTestHelper.RESOURCENAME)); }
public long getLastRevision(final String resourceName) throws JaxRxException, TTException { long lastRevision; if (mDatabase.existsResource(resourceName)) { ISession session = null; try { session = mDatabase.getSession(new SessionConfiguration(resourceName, StandardSettings.KEY)); lastRevision = session.getMostRecentVersion(); } catch (final Exception globExcep) { throw new JaxRxException(globExcep); } finally { session.close(); } } else { throw new JaxRxException(404, "Resource not found"); } return lastRevision; }
DatabaseRepresentation { public long getLastRevision(final String resourceName) throws JaxRxException, TTException { long lastRevision; if (mDatabase.existsResource(resourceName)) { ISession session = null; try { session = mDatabase.getSession(new SessionConfiguration(resourceName, StandardSettings.KEY)); lastRevision = session.getMostRecentVersion(); } catch (final Exception globExcep) { throw new JaxRxException(globExcep); } finally { session.close(); } } else { throw new JaxRxException(404, "Resource not found"); } return lastRevision; } }
DatabaseRepresentation { public long getLastRevision(final String resourceName) throws JaxRxException, TTException { long lastRevision; if (mDatabase.existsResource(resourceName)) { ISession session = null; try { session = mDatabase.getSession(new SessionConfiguration(resourceName, StandardSettings.KEY)); lastRevision = session.getMostRecentVersion(); } catch (final Exception globExcep) { throw new JaxRxException(globExcep); } finally { session.close(); } } else { throw new JaxRxException(404, "Resource not found"); } return lastRevision; } DatabaseRepresentation(final IStorage pDatabase, final IBackendFactory pStorageFac,
        final IRevisioning pRevision); }
DatabaseRepresentation { public long getLastRevision(final String resourceName) throws JaxRxException, TTException { long lastRevision; if (mDatabase.existsResource(resourceName)) { ISession session = null; try { session = mDatabase.getSession(new SessionConfiguration(resourceName, StandardSettings.KEY)); lastRevision = session.getMostRecentVersion(); } catch (final Exception globExcep) { throw new JaxRxException(globExcep); } finally { session.close(); } } else { throw new JaxRxException(404, "Resource not found"); } return lastRevision; } DatabaseRepresentation(final IStorage pDatabase, final IBackendFactory pStorageFac,
        final IRevisioning pRevision); void createResource(final InputStream inputStream, final String resourceName); StreamingOutput getResource(final String resourceName,
        final Map<QueryParameter, String> queryParams); StreamingOutput performQueryOnResource(final String resource, final String query,
        final Map<QueryParameter, String> otherParams); StreamingOutput getResourcesNames(); void add(final InputStream input, final String resource); void deleteResource(final String resourceName); final boolean shred(final InputStream xmlInput, final String resource); long getLastRevision(final String resourceName); OutputStream getModificHistory(final String resourceName, // NOPMD this method needs alls these
        // functions
        final String revisionRange, final boolean nodeid, final OutputStream output, final boolean wrap); void revertToRevision(final String resourceName, final long backToRevision); }
DatabaseRepresentation { public long getLastRevision(final String resourceName) throws JaxRxException, TTException { long lastRevision; if (mDatabase.existsResource(resourceName)) { ISession session = null; try { session = mDatabase.getSession(new SessionConfiguration(resourceName, StandardSettings.KEY)); lastRevision = session.getMostRecentVersion(); } catch (final Exception globExcep) { throw new JaxRxException(globExcep); } finally { session.close(); } } else { throw new JaxRxException(404, "Resource not found"); } return lastRevision; } DatabaseRepresentation(final IStorage pDatabase, final IBackendFactory pStorageFac,
        final IRevisioning pRevision); void createResource(final InputStream inputStream, final String resourceName); StreamingOutput getResource(final String resourceName,
        final Map<QueryParameter, String> queryParams); StreamingOutput performQueryOnResource(final String resource, final String query,
        final Map<QueryParameter, String> otherParams); StreamingOutput getResourcesNames(); void add(final InputStream input, final String resource); void deleteResource(final String resourceName); final boolean shred(final InputStream xmlInput, final String resource); long getLastRevision(final String resourceName); OutputStream getModificHistory(final String resourceName, // NOPMD this method needs alls these
        // functions
        final String revisionRange, final boolean nodeid, final OutputStream output, final boolean wrap); void revertToRevision(final String resourceName, final long backToRevision);  }