ACS-5506 Add missing annotations, hasSubgroups not required

This commit is contained in:
MichalKinas
2024-01-31 00:51:45 +01:00
parent d3c7342f05
commit 605c3a6ccd
4 changed files with 6 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
private String description; private String description;
@JsonProperty(required = true) @JsonProperty(required = true)
private Boolean isRoot; private Boolean isRoot;
@JsonProperty(required = true) @JsonProperty()
private Boolean hasSubgroups; private Boolean hasSubgroups;
@JsonProperty("parentIds") @JsonProperty("parentIds")

View File

@@ -1444,6 +1444,7 @@ public class AuthorityDAOImpl implements AuthorityDAO, NodeServicePolicies.Befor
nodeService.setProperty(ref, ContentModel.PROP_AUTHORITY_DISPLAY_NAME, authorityDisplayName); nodeService.setProperty(ref, ContentModel.PROP_AUTHORITY_DISPLAY_NAME, authorityDisplayName);
} }
@Override
public Pair<String, String> getAuthorityDisplayNameAndDescription(String authorityName) public Pair<String, String> getAuthorityDisplayNameAndDescription(String authorityName)
{ {
NodeRef ref = getAuthorityOrNull(authorityName); NodeRef ref = getAuthorityOrNull(authorityName);
@@ -1456,6 +1457,7 @@ public class AuthorityDAOImpl implements AuthorityDAO, NodeServicePolicies.Befor
return new Pair<>(DefaultTypeConverter.INSTANCE.convert(String.class, displayName), DefaultTypeConverter.INSTANCE.convert(String.class, description)); return new Pair<>(DefaultTypeConverter.INSTANCE.convert(String.class, displayName), DefaultTypeConverter.INSTANCE.convert(String.class, description));
} }
@Override
public void setAuthorityDisplayNameAndDescription(String authorityName, String authorityDisplayName, String description) public void setAuthorityDisplayNameAndDescription(String authorityName, String authorityDisplayName, String description)
{ {
NodeRef ref = getAuthorityOrNull(authorityName); NodeRef ref = getAuthorityOrNull(authorityName);

View File

@@ -700,6 +700,7 @@ public class AuthorityServiceImpl implements AuthorityService, InitializingBean
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public Pair<String, String> getAuthorityDisplayNameAndDescription(String name) public Pair<String, String> getAuthorityDisplayNameAndDescription(String name)
{ {
Pair<String, String> displayNameAndDescription = authorityDAO.getAuthorityDisplayNameAndDescription(name); Pair<String, String> displayNameAndDescription = authorityDAO.getAuthorityDisplayNameAndDescription(name);
@@ -713,6 +714,7 @@ public class AuthorityServiceImpl implements AuthorityService, InitializingBean
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public void setAuthorityDisplayNameAndDescription(String authorityName, String authorityDisplayName, String description) public void setAuthorityDisplayNameAndDescription(String authorityName, String authorityDisplayName, String description)
{ {
AuthorityType type = AuthorityType.getAuthorityType(authorityName); AuthorityType type = AuthorityType.getAuthorityType(authorityName);

View File

@@ -1433,6 +1433,7 @@ public class AuthorityServiceTest extends TestCase
assertEquals(pubAuthorityService.getAuthorityDisplayName("Monkey"), "Monkey"); assertEquals(pubAuthorityService.getAuthorityDisplayName("Monkey"), "Monkey");
} }
@Test
public void testAuthorityDisplayNameAndDescription() public void testAuthorityDisplayNameAndDescription()
{ {
Map<QName, Serializable> props = new HashMap<>(); Map<QName, Serializable> props = new HashMap<>();