Skip to content

Commit

Permalink
LPS-57255 Use PortalException
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellustavares authored and brianchandotcom committed Aug 3, 2015
1 parent fde4903 commit ab16257
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
Expand Up @@ -17,7 +17,6 @@
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.dynamicdatamapping.StorageEngineManager;
import com.liferay.portlet.dynamicdatamapping.StorageException;
import com.liferay.portlet.dynamicdatamapping.storage.DDMFormValues;
import com.liferay.portlet.dynamicdatamapping.storage.StorageEngine;
import com.liferay.portlet.dynamicdatamapping.util.DDM;
Expand All @@ -35,28 +34,26 @@ public class StorageEngineManagerImpl implements StorageEngineManager {
public long create(
long companyId, long ddmStructureId, DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException {
throws PortalException {

return _storageEngine.create(
companyId, ddmStructureId, ddmFormValues, serviceContext);
}

@Override
public void deleteByClass(long classPK) throws StorageException {
public void deleteByClass(long classPK) throws PortalException {
_storageEngine.deleteByClass(classPK);
}

@Override
public void deleteByDDMStructure(long ddmStructureId)
throws StorageException {
throws PortalException {

_storageEngine.deleteByDDMStructure(ddmStructureId);
}

@Override
public DDMFormValues getDDMFormValues(long classPK)
throws StorageException {

public DDMFormValues getDDMFormValues(long classPK) throws PortalException {
return _storageEngine.getDDMFormValues(classPK);
}

Expand All @@ -74,7 +71,7 @@ public DDMFormValues getDDMFormValues(
public void update(
long classPK, DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException {
throws PortalException {

_storageEngine.update(classPK, ddmFormValues, serviceContext);
}
Expand Down
Expand Up @@ -28,14 +28,14 @@ public interface StorageEngineManager {
public long create(
long companyId, long ddmStructureId, DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException;
throws PortalException;

public void deleteByClass(long classPK) throws StorageException;
public void deleteByClass(long classPK) throws PortalException;

public void deleteByDDMStructure(long ddmStructureId)
throws StorageException;
throws PortalException;

public DDMFormValues getDDMFormValues(long classPK) throws StorageException;
public DDMFormValues getDDMFormValues(long classPK) throws PortalException;

public DDMFormValues getDDMFormValues(
long ddmStructureId, String fieldNamespace,
Expand All @@ -45,6 +45,6 @@ public DDMFormValues getDDMFormValues(
public void update(
long classPK, DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException;
throws PortalException;

}
Expand Up @@ -27,24 +27,24 @@ public class StorageEngineManagerUtil {
public static long create(
long companyId, long ddmStructureId, DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException {
throws PortalException {

return _storageEngineManager.create(
companyId, ddmStructureId, ddmFormValues, serviceContext);
}

public static void deleteByClass(long classPK) throws StorageException {
public static void deleteByClass(long classPK) throws PortalException {
_storageEngineManager.deleteByClass(classPK);
}

public static void deleteByDDMStructure(long ddmStructureId)
throws StorageException {
throws PortalException {

_storageEngineManager.deleteByDDMStructure(ddmStructureId);
}

public static DDMFormValues getDDMFormValues(long classPK)
throws StorageException {
throws PortalException {

return _storageEngineManager.getDDMFormValues(classPK);
}
Expand All @@ -61,7 +61,7 @@ public static DDMFormValues getDDMFormValues(
public static void update(
long classPK, DDMFormValues ddmFormValues,
ServiceContext serviceContext)
throws StorageException {
throws PortalException {

_storageEngineManager.update(classPK, ddmFormValues, serviceContext);
}
Expand Down

0 comments on commit ab16257

Please sign in to comment.