LPS-40792

Hey Alex,

There are some weird things in this service. They were introduced with this ticket LPS-30418

The change that I did is that instead of throw an exception return a 0 or empty list (that's the pattern that we use for this service methods)

The other thing is that there are some weird methods like (it returns an int but doesn't have the count word in the method):

```java
	@Override
	public int getFoldersAndFileEntriesAndFileShortcuts(
			long groupId, long folderId, int status, String[] mimeTypes,
			boolean includeMountFolders)
		throws PortalException, SystemException {

		if (!DLFolderPermission.contains(
				getPermissionChecker(), groupId, folderId, ActionKeys.VIEW)) {

			return 0;
		}

		QueryDefinition queryDefinition = new QueryDefinition(status);

		return dlFolderFinder.filterCountF_FE_FS_ByG_F_M_M(
			groupId, folderId, mimeTypes, includeMountFolders, queryDefinition);
	}
```

and this other method that has the count word on it and is exactly the same as the other one but it doesn't have the check for the dynamic inheritance.

```java
	@Override
	public int getFoldersAndFileEntriesAndFileShortcutsCount(
			long groupId, long folderId, int status, String[] mimeTypes,
			boolean includeMountFolders)
		throws SystemException {

		QueryDefinition queryDefinition = new QueryDefinition(status);

		return dlFolderFinder.filterCountF_FE_FS_ByG_F_M_M(
			groupId, folderId, mimeTypes, includeMountFolders, queryDefinition);
	}
```

The other thing is that there are many methods in that service that they don't have any permission check and I think that they should. Is there any reason for this?

Thanks!