Package org.apache.jackrabbit.core.data

Examples of org.apache.jackrabbit.core.data.DataRecord


            DbUtility.close(rs);
        }
    }

    public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException {
        DataRecord record = getRecordIfStored(identifier);
        if (record == null) {
            throw new DataStoreException("Record not found: " + identifier);
        }
        return record;
    }
View Full Code Here


     */
    @Override
    public String writeBlob(InputStream in) throws IOException {
        try {
            // add the record in the data store
            DataRecord dataRec = dataStore.addRecord(in);
            return dataRec.getIdentifier().toString();
        } catch (DataStoreException e) {
            throw new IOException(e);
        } finally {
            IOUtils.closeQuietly(in);
        }
View Full Code Here

    @Override
    public boolean deleteChunk(String blobId, long maxLastModifiedTime) throws Exception {
        if (dataStore instanceof MultiDataStoreAware) {
            DataIdentifier identifier = new DataIdentifier(blobId);
            DataRecord dataRecord = dataStore.getRecord(identifier);
            if ((maxLastModifiedTime <= 0)
                    || dataRecord.getLastModified() <= maxLastModifiedTime) {
                ((MultiDataStoreAware) dataStore).deleteRecord(identifier);
                return true;
            }
        }
        return false;
View Full Code Here

    static BLOBInDataStore getInstance(DataStore store, DataIdentifier identifier) {
        return new BLOBInDataStore(store, identifier);
    }

    static BLOBInDataStore getInstance(DataStore store, InputStream in) throws DataStoreException {
        DataRecord rec = store.addRecord(in);
        DataIdentifier identifier = rec.getIdentifier();
        if (auditLogger.isDebugEnabled()) {
            auditLogger.debug("{} ({})", identifier, rec.getLength());
        }
        return new BLOBInDataStore(store, identifier);
    }
View Full Code Here

    static BLOBInDataStore getInstance(DataStore store, DataIdentifier identifier) {
        return new BLOBInDataStore(store, identifier);
    }

    static BLOBInDataStore getInstance(DataStore store, InputStream in) throws DataStoreException {
        DataRecord rec = store.addRecord(in);
        DataIdentifier identifier = rec.getIdentifier();
        return new BLOBInDataStore(store, identifier);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.data.DataRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.