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

LPS-107130 Regenerate service #83325

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -201,6 +201,44 @@ public static com.liferay.portal.kernel.model.Repository getRepository(
}
}

public static com.liferay.portal.kernel.model.Repository getRepository(
HttpPrincipal httpPrincipal, long groupId, String portletId)
throws com.liferay.portal.kernel.exception.PortalException {

try {
MethodKey methodKey = new MethodKey(
RepositoryServiceUtil.class, "getRepository",
_getRepositoryParameterTypes4);

MethodHandler methodHandler = new MethodHandler(
methodKey, groupId, portletId);

Object returnObj = null;

try {
returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
}
catch (Exception e) {
if (e instanceof
com.liferay.portal.kernel.exception.PortalException) {

throw (com.liferay.portal.kernel.exception.PortalException)
e;
}

throw new com.liferay.portal.kernel.exception.SystemException(
e);
}

return (com.liferay.portal.kernel.model.Repository)returnObj;
}
catch (com.liferay.portal.kernel.exception.SystemException se) {
_log.error(se, se);

throw se;
}
}

public static com.liferay.portal.kernel.util.UnicodeProperties
getTypeSettingsProperties(
HttpPrincipal httpPrincipal, long repositoryId)
Expand All @@ -209,7 +247,7 @@ public static com.liferay.portal.kernel.model.Repository getRepository(
try {
MethodKey methodKey = new MethodKey(
RepositoryServiceUtil.class, "getTypeSettingsProperties",
_getTypeSettingsPropertiesParameterTypes4);
_getTypeSettingsPropertiesParameterTypes5);

MethodHandler methodHandler = new MethodHandler(
methodKey, repositoryId);
Expand Down Expand Up @@ -248,7 +286,7 @@ public static void updateRepository(
try {
MethodKey methodKey = new MethodKey(
RepositoryServiceUtil.class, "updateRepository",
_updateRepositoryParameterTypes5);
_updateRepositoryParameterTypes6);

MethodHandler methodHandler = new MethodHandler(
methodKey, repositoryId, name, description);
Expand Down Expand Up @@ -291,9 +329,11 @@ public static void updateRepository(
new Class[] {long.class};
private static final Class<?>[] _getRepositoryParameterTypes3 =
new Class[] {long.class};
private static final Class<?>[] _getTypeSettingsPropertiesParameterTypes4 =
private static final Class<?>[] _getRepositoryParameterTypes4 =
new Class[] {long.class, String.class};
private static final Class<?>[] _getTypeSettingsPropertiesParameterTypes5 =
new Class[] {long.class};
private static final Class<?>[] _updateRepositoryParameterTypes5 =
private static final Class<?>[] _updateRepositoryParameterTypes6 =
new Class[] {long.class, String.class, String.class};

}
Expand Up @@ -105,6 +105,24 @@ public static com.liferay.portal.kernel.model.RepositorySoap getRepository(
}
}

public static com.liferay.portal.kernel.model.RepositorySoap getRepository(
long groupId, String portletId)
throws RemoteException {

try {
com.liferay.portal.kernel.model.Repository returnValue =
RepositoryServiceUtil.getRepository(groupId, portletId);

return com.liferay.portal.kernel.model.RepositorySoap.toSoapModel(
returnValue);
}
catch (Exception e) {
_log.error(e, e);

throw new RemoteException(e.getMessage());
}
}

public static com.liferay.portal.kernel.util.UnicodeProperties
getTypeSettingsProperties(long repositoryId)
throws RemoteException {
Expand Down
Expand Up @@ -91,6 +91,21 @@ _folderModelResourcePermission, getPermissionChecker(),
return repository;
}

@Override
public Repository getRepository(long groupId, String portletId)
throws PortalException {

Repository repository = repositoryPersistence.findByG_N_P(
groupId, portletId, portletId);

ModelResourcePermissionHelper.check(
_folderModelResourcePermission, getPermissionChecker(),
repository.getGroupId(), repository.getDlFolderId(),
ActionKeys.VIEW);

return repository;
}

@Override
public UnicodeProperties getTypeSettingsProperties(long repositoryId)
throws PortalException {
Expand Down
Expand Up @@ -70,6 +70,10 @@ public Repository addRepository(
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Repository getRepository(long repositoryId) throws PortalException;

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Repository getRepository(long groupId, String portletId)
throws PortalException;

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public UnicodeProperties getTypeSettingsProperties(long repositoryId)
throws PortalException;
Expand Down
Expand Up @@ -76,6 +76,13 @@ public static com.liferay.portal.kernel.model.Repository getRepository(
return getService().getRepository(repositoryId);
}

public static com.liferay.portal.kernel.model.Repository getRepository(
long groupId, String portletId)
throws com.liferay.portal.kernel.exception.PortalException {

return getService().getRepository(groupId, portletId);
}

public static com.liferay.portal.kernel.util.UnicodeProperties
getTypeSettingsProperties(long repositoryId)
throws com.liferay.portal.kernel.exception.PortalException {
Expand Down
Expand Up @@ -75,6 +75,14 @@ public com.liferay.portal.kernel.model.Repository getRepository(
return _repositoryService.getRepository(repositoryId);
}

@Override
public com.liferay.portal.kernel.model.Repository getRepository(
long groupId, java.lang.String portletId)
throws com.liferay.portal.kernel.exception.PortalException {

return _repositoryService.getRepository(groupId, portletId);
}

@Override
public com.liferay.portal.kernel.util.UnicodeProperties
getTypeSettingsProperties(long repositoryId)
Expand Down