From 33b43ba93fbd6bd57be179e49a4f68a93460ea8e Mon Sep 17 00:00:00 2001 From: dhrn Date: Wed, 4 Nov 2020 12:19:58 +0530 Subject: [PATCH] * minor changes --- .../repo/invitation/InvitationImpl.java | 6 +- .../service/cmr/invitation/Invitation.java | 56 ++++++++++--------- .../AbstractInvitationServiceImplTest.java | 1 + 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/repository/src/main/java/org/alfresco/repo/invitation/InvitationImpl.java b/repository/src/main/java/org/alfresco/repo/invitation/InvitationImpl.java index 5b638ff0f9..05fd154df1 100644 --- a/repository/src/main/java/org/alfresco/repo/invitation/InvitationImpl.java +++ b/repository/src/main/java/org/alfresco/repo/invitation/InvitationImpl.java @@ -73,7 +73,7 @@ import org.alfresco.service.cmr.invitation.Invitation.ResourceType; private final Date modifiedAt; - private final Date clientName; + private final String clientName; public InvitationImpl(Map props) { @@ -85,7 +85,7 @@ import org.alfresco.service.cmr.invitation.Invitation.ResourceType; this.resourceType = type==null ? ResourceType.WEB_SITE : ResourceType.valueOf(type); this.createdAt = (Date)props.get(CREATED_AT); this.modifiedAt = (Date)props.get(MODIFIED_AT); - this.clientName = (Date)props.get(CLIENT_NAME); + this.clientName = (String)props.get(CLIENT_NAME); } /** @@ -127,7 +127,7 @@ import org.alfresco.service.cmr.invitation.Invitation.ResourceType; return inviteeUserName; } - public Date getClientName() + public String getClientName() { return clientName; } diff --git a/repository/src/main/java/org/alfresco/service/cmr/invitation/Invitation.java b/repository/src/main/java/org/alfresco/service/cmr/invitation/Invitation.java index 98307c299d..483c5c858e 100644 --- a/repository/src/main/java/org/alfresco/service/cmr/invitation/Invitation.java +++ b/repository/src/main/java/org/alfresco/service/cmr/invitation/Invitation.java @@ -1,28 +1,28 @@ -/* - * #%L - * Alfresco Repository - * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited - * %% - * This file is part of the Alfresco software. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - * #L% - */ +/* + * #%L + * Alfresco Repository + * %% + * Copyright (C) 2005 - 2016 Alfresco Software Limited + * %% + * This file is part of the Alfresco software. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + * #L% + */ package org.alfresco.service.cmr.invitation; import java.util.Date; @@ -97,4 +97,10 @@ public interface Invitation Date getCreatedAt(); Date getModifiedAt(); + + /** + * Which client to be sent + * @return the clientName + */ + String getClientName(); } diff --git a/repository/src/test/java/org/alfresco/repo/invitation/AbstractInvitationServiceImplTest.java b/repository/src/test/java/org/alfresco/repo/invitation/AbstractInvitationServiceImplTest.java index f3eed6467b..24db782825 100644 --- a/repository/src/test/java/org/alfresco/repo/invitation/AbstractInvitationServiceImplTest.java +++ b/repository/src/test/java/org/alfresco/repo/invitation/AbstractInvitationServiceImplTest.java @@ -1040,6 +1040,7 @@ public abstract class AbstractInvitationServiceImplTest extends BaseAlfrescoSpri assertEquals("comments", comments, invitation.getInviteeComments()); assertEquals("resource type name wrong", resourceType, invitation.getResourceType()); assertEquals("resource name wrong", resourceName, invitation.getResourceName()); + assertEquals("client name wrong", "workspace", invitation.getClientName()); /** * Now we have an invitation get it and check the details have been