本文整理了Java中org.apache.jackrabbit.oak.spi.blob.BlobStore.getReference()
方法的一些代码示例,展示了BlobStore.getReference()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlobStore.getReference()
方法的具体详情如下:
包路径:org.apache.jackrabbit.oak.spi.blob.BlobStore
类名称:BlobStore
方法名:getReference
[英]Returns a secure reference to blob referred by blobid, or null if no such reference is available.
[中]
代码示例来源:origin: org.apache.jackrabbit/oak-blob-plugins
@Override @Nullable
public String getReference() {
return blobStore.getReference(blobId);
}
代码示例来源:origin: apache/jackrabbit-oak
@Override @Nullable
public String getReference() {
return blobStore.getReference(blobId);
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
@Override @CheckForNull
public String getReference() {
return blobStore.getReference(blobId);
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
@Override
public String getReference(String blobId) {
try {
if (isMigrated(blobId)) {
return NEW_BLOBSTORE_PREFIX + newBlobStore.getReference(blobId);
} else {
return OLD_BLOBSTORE_PREFIX + oldBlobStore.getReference(blobId);
}
} catch (IOException e) {
log.error("Can't get reference", e);
return null;
}
}
代码示例来源:origin: apache/jackrabbit-oak
@Override
public String getReference(String blobId) {
try {
if (isMigrated(blobId)) {
return NEW_BLOBSTORE_PREFIX + newBlobStore.getReference(blobId);
} else {
return OLD_BLOBSTORE_PREFIX + oldBlobStore.getReference(blobId);
}
} catch (IOException e) {
log.error("Can't get reference", e);
return null;
}
}
代码示例来源:origin: org.apache.jackrabbit/oak-blob
@Override
public String getReference(String blobId) {
try {
if (isMigrated(blobId)) {
return NEW_BLOBSTORE_PREFIX + newBlobStore.getReference(blobId);
} else {
return OLD_BLOBSTORE_PREFIX + oldBlobStore.getReference(blobId);
}
} catch (IOException e) {
log.error("Can't get reference", e);
return null;
}
}
代码示例来源:origin: apache/jackrabbit-oak
@Override
@Nullable
public String getReference() {
String blobId = getBlobId();
if (blobId != null) {
if (blobStore != null) {
return blobStore.getReference(blobId);
} else {
throw new IllegalStateException("Attempt to read external blob with blobId [" + blobId + "] " +
"without specifying BlobStore");
}
}
return null;
}
代码示例来源:origin: apache/jackrabbit-oak
@SuppressWarnings("ConstantConditions")
@Test(expected = NullPointerException.class)
public void getReferenceShouldThrowAnExceptionWhenNullIsPassed() {
given:
{
final BlobStore blobStore = new LoopbackBlobStore();
when:
{
blobStore.getReference(null);
}
}
}
代码示例来源:origin: apache/jackrabbit-oak
@Test
@Parameters(method = "blobIds")
public void getReferenceShouldReturnTheSameValuePassedExceptOfNull(
final String blobId) {
given:
{
final BlobStore blobStore = new LoopbackBlobStore();
where:
{
expect:
{
assertEquals(blobId, blobStore.getReference(blobId));
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!