Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): Expose the editableAsText attribute, even if the metadata file doesn't have it yet #27393 #27398

Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions dotCMS/src/main/java/com/dotcms/storage/FileStorageAPI.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dotcms.storage;

import com.dotcms.storage.model.BasicMetadataFields;
import com.dotmarketing.exception.DotDataException;
import com.dotmarketing.util.Config;

Expand All @@ -8,8 +9,11 @@
import java.util.Map;

/**
* This class is in charge of resolve File (on diff repositories), metadata, etc.
* This Storage API is in charge of generating, removing and storing file metadata in dotCMS using
* the File System as its storage volume.
*
* @author jsanca
* @since Oct 19th, 2020
*/
public interface FileStorageAPI {

Expand Down Expand Up @@ -56,9 +60,23 @@ Map<String, Serializable> generateMetaData(final File binary, final GenerateMeta
throws DotDataException;

/**
* Retrieve the metadata
* @param requestMetaData {@link FetchMetadataParams}
* @return Map with the metadata
* Retrieves the metadata object from the configured Storage Provider. There are a couple of
* aspects to take into consideration when calling this method:
* <ul>
* <li>Depending on the configuration of the {@link FetchMetadataParams} parameter, the
* resulting metadata object may be cached.</li>
* <li>For performance reasons, the {@link BasicMetadataFields#EDITABLE_AS_TEXT} property
* is always calculated <b>UNLESS</b> it's already present in the metadata Map. This way,
* Files don't need to be re-indexed for it to be available.</li>
* </ul>
*
* @param requestMetaData The {@link FetchMetadataParams} object specifying how the metadata
* should be retrieved.
*
* @return A key/value Map with the expected metadata properties.
*
* @throws DotDataException An error occurred when retrieving the metadata from the Storage
* Provider.
*/
Map<String, Serializable> retrieveMetaData(final FetchMetadataParams requestMetaData) throws DotDataException;

Expand Down
77 changes: 26 additions & 51 deletions dotCMS/src/main/java/com/dotcms/storage/FileStorageAPIImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.dotmarketing.business.CacheLocator;
import com.dotmarketing.exception.DotDataException;
import com.dotmarketing.portlets.contentlet.business.MetadataCache;
import com.dotmarketing.util.FileUtil;
import com.dotmarketing.util.Logger;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
Expand All @@ -26,6 +27,7 @@

import static com.dotcms.storage.StoragePersistenceAPI.HASH_OBJECT;
import static com.dotcms.storage.model.BasicMetadataFields.CONTENT_TYPE_META_KEY;
import static com.dotcms.storage.model.BasicMetadataFields.EDITABLE_AS_TEXT;
import static com.dotcms.storage.model.BasicMetadataFields.LENGTH_META_KEY;
import static com.dotcms.storage.model.BasicMetadataFields.SIZE_META_KEY;
import static com.dotcms.storage.model.BasicMetadataFields.VERSION_KEY;
Expand Down Expand Up @@ -75,22 +77,11 @@
CacheLocator.getMetadataCache());
}

/**
* {@inheritDoc}
* @param binary {@link File} file to get the information
* @return
*/
@Override
public Map<String, Serializable> generateRawBasicMetaData(final File binary) {
return this.generateBasicMetaData(binary, s -> true); // raw = no filter
}

/**
* {@inheritDoc}
* @param binary {@link File} file to get the information
* @param maxLength {@link Long} max length is used when parse the content, how many bytes do you want to parse.
* @return
*/
@Override
public Map<String, Serializable> generateRawFullMetaData(final File binary, long maxLength) {
return this.generateFullMetaData(binary, s -> true, maxLength); // raw = no filter
Expand Down Expand Up @@ -195,12 +186,6 @@
return metadataMap;
}

/**
* {@inheritDoc}
* @param binary {@link File} file to get the information
* @param configuration {@link GenerateMetadataConfig}
* @return
*/
@Override
public Map<String, Serializable> generateMetaData(final File binary,
final GenerateMetadataConfig configuration) throws DotDataException {
Expand Down Expand Up @@ -387,50 +372,56 @@
}
}

/**
* {@inheritDoc}
* @param requestMetaData {@link FetchMetadataParams}
* @return
*/
@Override
public Map<String, Serializable> retrieveMetaData(final FetchMetadataParams requestMetaData)
throws DotDataException {
if (requestMetaData.isCache()) {
final Map<String, Serializable> metadataMap = metadataCache
final Map<String, Serializable> metadataMap = this.metadataCache
.getMetadataMap(requestMetaData.getCacheKeySupplier().get());
if (null != metadataMap) {
checkEditableAsText(metadataMap);
putIntoCache(requestMetaData.getCacheKeySupplier().get(), metadataMap);
return metadataMap;
}
}

Map<String, Serializable> metadataMap = null;
final StorageKey storageKey = requestMetaData.getStorageKey();
final StoragePersistenceAPI storage = persistenceProvider
final StoragePersistenceAPI storage = this.persistenceProvider
.getStorage(storageKey.getStorage());

this.checkBucket(storageKey, storage);
if (storage.existsObject(storageKey.getGroup(), storageKey.getPath())) {

metadataMap = retrieveMetadata(storageKey, storage);
Logger.debug(FileStorageAPIImpl.class,
"Retrieve the meta data from storage, path: " + storageKey.getPath());
() -> "Retrieve the meta data from storage path: " + storageKey.getPath());
checkEditableAsText(metadataMap);
if (null != requestMetaData.getCacheKeySupplier()) {
final Map<String, Serializable> projection = requestMetaData.getProjectionMapForCache().apply(metadataMap);
putIntoCache(requestMetaData.getCacheKeySupplier().get(), projection);
return projection;
}

}

return metadataMap;
}

/***
* {@inheritDoc}
* @param requestMetaData {@link FetchMetadataParams}
* @return
* @throws DotDataException
/**
* Performs a simple check that verifies whether the File that the metadata belongs to can be
* editable as a text file. If it can, the {@link BasicMetadataFields#EDITABLE_AS_TEXT} property
* will be added.
* <p>This is particularly useful in the File's edit mode in the back-end for dotCMS to allow
* content authors to edit the contents directly in the Code Editor field.</p>
*
* @param metadataMap The File's metadata Map.
*/
private void checkEditableAsText(final Map<String, Serializable> metadataMap) {
if (!metadataMap.containsKey(BasicMetadataFields.EDITABLE_AS_TEXT.key())) {
metadataMap.put(EDITABLE_AS_TEXT.key(),
FileUtil.isFileEditableAsText(metadataMap.get(CONTENT_TYPE_META_KEY.key()).toString()));

Check failure on line 420 in dotCMS/src/main/java/com/dotcms/storage/FileStorageAPIImpl.java

View workflow job for this annotation

GitHub Actions / MVN Test Report IT Tests - JDK 11 - MainSuite 2a

com.dotcms.MainSuite2a ► com.dotmarketing.image.focalpoint.FocalPointAPITest ► Test_Write_Focal_Point_From_Temp_Asset_Id

Failed test found in: dotcms-integration/target/failsafe-reports/TEST-com.dotcms.MainSuite2a.xml Error: java.lang.NullPointerException
Raw output
java.lang.NullPointerException
	at com.dotcms.storage.FileStorageAPIImpl.checkEditableAsText(FileStorageAPIImpl.java:420)
	at com.dotcms.storage.FileStorageAPIImpl.retrieveMetaData(FileStorageAPIImpl.java:382)
	at com.dotcms.storage.FileMetadataAPIImpl.getMetadata(FileMetadataAPIImpl.java:780)
	at com.dotmarketing.image.focalpoint.FocalPointAPIImpl.readFocalPointMeta(FocalPointAPIImpl.java:167)
	at com.dotmarketing.image.focalpoint.FocalPointAPIImpl.readFocalPoint(FocalPointAPIImpl.java:147)
	at com.dotmarketing.image.focalpoint.FocalPointAPITest.Test_Write_Focal_Point_From_Temp_Asset_Id(FocalPointAPITest.java:161)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:41)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:26)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at com.dotcms.junit.MainBaseSuite$DotRunner.run(MainBaseSuite.java:71)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Check failure on line 420 in dotCMS/src/main/java/com/dotcms/storage/FileStorageAPIImpl.java

View workflow job for this annotation

GitHub Actions / MVN Test Report IT Tests - JDK 11 - MainSuite 2b

com.dotcms.MainSuite2b ► com.dotcms.storage.FileMetadataAPITest ► Test_Add_Then_Recover_Temp_Resource_Metadata

Failed test found in: dotcms-integration/target/failsafe-reports/TEST-com.dotcms.MainSuite2b.xml Error: java.lang.NullPointerException
Raw output
java.lang.NullPointerException
	at com.dotcms.storage.FileStorageAPIImpl.checkEditableAsText(FileStorageAPIImpl.java:420)
	at com.dotcms.storage.FileStorageAPIImpl.retrieveMetaData(FileStorageAPIImpl.java:382)
	at com.dotcms.storage.FileMetadataAPIImpl.getMetadata(FileMetadataAPIImpl.java:780)
	at com.dotcms.storage.FileMetadataAPITest.Test_Add_Then_Recover_Temp_Resource_Metadata(FileMetadataAPITest.java:952)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:41)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:26)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at com.dotcms.junit.MainBaseSuite$DotRunner.run(MainBaseSuite.java:71)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Check failure on line 420 in dotCMS/src/main/java/com/dotcms/storage/FileStorageAPIImpl.java

View workflow job for this annotation

GitHub Actions / MVN Test Report IT Tests - JDK 11 - MainSuite 2b

com.dotcms.MainSuite2b ► com.dotcms.storage.FileMetadataAPITest ► Test_Copy_Metadata[0: FILE_SYSTEM]

Failed test found in: dotcms-integration/target/failsafe-reports/TEST-com.dotcms.MainSuite2b.xml Error: java.lang.NullPointerException
Raw output
java.lang.NullPointerException
	at com.dotcms.storage.FileStorageAPIImpl.checkEditableAsText(FileStorageAPIImpl.java:420)
	at com.dotcms.storage.FileStorageAPIImpl.retrieveMetaData(FileStorageAPIImpl.java:382)
	at com.dotcms.storage.FileMetadataAPIImpl.internalGetGenerateMetadata(FileMetadataAPIImpl.java:339)
	at com.dotcms.storage.FileMetadataAPIImpl.getOrGenerateMetadata(FileMetadataAPIImpl.java:320)
	at com.dotmarketing.portlets.contentlet.model.Contentlet.getBinaryMetadata(Contentlet.java:1287)
	at com.dotcms.storage.FileMetadataAPITest.Test_Copy_Metadata(FileMetadataAPITest.java:799)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at com.tngtech.java.junit.dataprovider.DataProviderFrameworkMethod.invokeExplosively(DataProviderFrameworkMethod.java:119)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:41)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:26)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at com.dotcms.junit.MainBaseSuite$DotRunner.run(MainBaseSuite.java:71)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Check failure on line 420 in dotCMS/src/main/java/com/dotcms/storage/FileStorageAPIImpl.java

View workflow job for this annotation

GitHub Actions / MVN Test Report IT Tests - JDK 11 - MainSuite 2b

com.dotcms.MainSuite2b ► com.dotcms.storage.FileMetadataAPITest ► Test_Copy_Metadata[1: DB]

Failed test found in: dotcms-integration/target/failsafe-reports/TEST-com.dotcms.MainSuite2b.xml Error: java.lang.NullPointerException
Raw output
java.lang.NullPointerException
	at com.dotcms.storage.FileStorageAPIImpl.checkEditableAsText(FileStorageAPIImpl.java:420)
	at com.dotcms.storage.FileStorageAPIImpl.retrieveMetaData(FileStorageAPIImpl.java:382)
	at com.dotcms.storage.FileMetadataAPIImpl.internalGetGenerateMetadata(FileMetadataAPIImpl.java:339)
	at com.dotcms.storage.FileMetadataAPIImpl.getOrGenerateMetadata(FileMetadataAPIImpl.java:320)
	at com.dotmarketing.portlets.contentlet.model.Contentlet.getBinaryMetadata(Contentlet.java:1287)
	at com.dotcms.storage.FileMetadataAPITest.Test_Copy_Metadata(FileMetadataAPITest.java:799)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at com.tngtech.java.junit.dataprovider.DataProviderFrameworkMethod.invokeExplosively(DataProviderFrameworkMethod.java:119)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:41)
	at com.dotcms.junit.CustomDataProviderRunner.runChild(CustomDataProviderRunner.java:26)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at com.dotcms.junit.MainBaseSuite$DotRunner.run(MainBaseSuite.java:71)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
}
}

@Override
public boolean removeMetaData(final FetchMetadataParams requestMetaData) throws DotDataException{
boolean deleteSucceeded = false;
final StorageKey storageKey = requestMetaData.getStorageKey();
Expand All @@ -443,12 +434,7 @@
return deleteSucceeded;
}

/***
* {@inheritDoc}
* @param requestMetaData {@link FetchMetadataParams}
* @return
* @throws DotDataException
*/
@Override
public boolean removeVersionMetaData(final FetchMetadataParams requestMetaData) throws DotDataException{
boolean deleteSucceeded = false;
final StorageKey storageKey = requestMetaData.getStorageKey();
Expand All @@ -461,12 +447,6 @@
return deleteSucceeded;
}

/**
* {@inheritDoc}
* @param fetchMetadataParams
* @param customAttributes
* @throws DotDataException
*/
@Override
public void putCustomMetadataAttributes(
final FetchMetadataParams fetchMetadataParams,
Expand Down Expand Up @@ -527,12 +507,7 @@

}

/**
* {@inheritDoc}
* @param requestMetadata
* @param metadata
* @throws DotDataException
*/
@Override
public boolean setMetadata(final FetchMetadataParams requestMetadata,
final Map<String, Serializable> metadata) throws DotDataException {
final StorageKey storageKey = requestMetadata.getStorageKey();
Expand Down
Loading