-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
155 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 0 additions & 73 deletions
73
...core-repo/src/main/java/com/enonic/xp/repo/impl/dump/blobstore/AbstractDumpBlobStore.java
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...es/core/core-repo/src/main/java/com/enonic/xp/repo/impl/dump/blobstore/BlobContainer.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
modules/core/core-repo/src/main/java/com/enonic/xp/repo/impl/dump/blobstore/BlobHolder.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
...es/core/core-repo/src/main/java/com/enonic/xp/repo/impl/dump/blobstore/DumpBlobStore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
package com.enonic.xp.repo.impl.dump.blobstore; | ||
|
||
import com.enonic.xp.blob.BlobKey; | ||
import com.enonic.xp.blob.Segment; | ||
import com.google.common.io.ByteSource; | ||
|
||
public interface DumpBlobStore | ||
{ | ||
DumpBlobRecord getRecord( Segment segment, BlobKey key ); | ||
ByteSource getBytes( BlobReference reference ); | ||
|
||
void addRecord( BlobContainer blobContainer ); | ||
void addRecord( BlobReference blobContainer ); | ||
} |
29 changes: 29 additions & 0 deletions
29
...re/core-repo/src/main/java/com/enonic/xp/repo/impl/dump/blobstore/DumpBlobStoreUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.enonic.xp.repo.impl.dump.blobstore; | ||
|
||
import com.google.common.io.ByteSource; | ||
|
||
import com.enonic.xp.blob.BlobStore; | ||
import com.enonic.xp.repo.impl.dump.PathRef; | ||
import com.enonic.xp.repository.RepositorySegmentUtils; | ||
|
||
public final class DumpBlobStoreUtils | ||
{ | ||
private DumpBlobStoreUtils() | ||
{ | ||
} | ||
|
||
public static PathRef getBlobPathRef( final PathRef parent, final BlobReference reference ) | ||
{ | ||
final String id = reference.getKey().toString(); | ||
return parent.resolve( reference.getSegment().getLevel( RepositorySegmentUtils.BLOB_TYPE_LEVEL ).getValue() ) | ||
.resolve( id.substring( 0, 2 ) ) | ||
.resolve( id.substring( 2, 4 ) ) | ||
.resolve( id.substring( 4, 6 ) ) | ||
.resolve( id ); | ||
} | ||
|
||
public static ByteSource getBytesByReference( final BlobStore sourceBlobStore, final BlobReference reference ) | ||
{ | ||
return sourceBlobStore.getRecord( reference.getSegment(), reference.getKey() ).getBytes(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.