Search code examples
javaliferayliferay-7

Need help testing a method in liferay api/jsonws


I'm trying to test a function from the api/jsonws in liferay 7.3.5-ga6.

The function I'm trying to test is "update-group" from the class GroupLocalServiceUtil. I'm running into a problem when filling in the variables. Specifically, the "nameMap" and "descriptionMap". These variables are in the "java.util.map" datatype and I'm struggling to figure out what exactly to fill in here. I want to use this function to update a site(group) in liferay programmatically.

Does anyone know what I need to fill in here?


Solution

  • This is the signature of the method behind update-group api/jsonws

    Look at GroupServiceImpl class.

    public Group updateGroup(
            long groupId, long parentGroupId, Map<Locale, String> nameMap,
            Map<Locale, String> descriptionMap, int type,
            boolean manualMembership, int membershipRestriction,
            String friendlyURL, boolean inheritContent, boolean active,
            ServiceContext serviceContext)
        throws PortalException {
    

    Try the following json in the nameMap parameter:

    {
     "it_IT":"name it",
     "fr_FR":"name fr"
    }