Files
alfresco-community-repo/source/java/org/alfresco/service/cmr/activities/ActivityInfo.java
Jamal Kaabi-Mofrad a5a0dba0c1 Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
125122 jkaabimofrad: RA-884: Fixed minor code standards issues.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126610 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2016-05-10 11:50:11 +00:00

100 lines
2.6 KiB
Java

/*
* Copyright (C) 2005-2016 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* 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 <http://www.gnu.org/licenses/>.
*/
package org.alfresco.service.cmr.activities;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Basic Activity information for use when posting Activities.
*
* @author Gethin James
*/
public class ActivityInfo
{
private final NodeRef nodeRef;
private final String parentPath;
private final NodeRef parentNodeRef;
private final String siteId;
private final String fileName;
private final boolean isFolder;
private final FileInfo fileInfo;
public ActivityInfo(NodeRef nodeRef, String parentPath, NodeRef parentNodeRef,
String siteId, String fileName, boolean isFolder)
{
super();
this.nodeRef = nodeRef;
this.parentPath = parentPath;
this.parentNodeRef = parentNodeRef;
this.siteId = siteId;
this.fileName = fileName;
this.isFolder = isFolder;
this.fileInfo = null;
}
public ActivityInfo(String parentPath, NodeRef parentNodeRef, String siteId, FileInfo fileInfo)
{
super();
this.nodeRef = fileInfo.getNodeRef();
this.parentPath = parentPath;
this.parentNodeRef = parentNodeRef;
this.siteId = siteId;
this.fileName = fileInfo.getName();
this.isFolder = fileInfo.isFolder();
this.fileInfo = fileInfo;
}
public FileInfo getFileInfo()
{
return fileInfo;
}
public NodeRef getNodeRef()
{
return nodeRef;
}
public String getParentPath()
{
return parentPath;
}
public NodeRef getParentNodeRef()
{
return parentNodeRef;
}
public String getSiteId()
{
return siteId;
}
public String getFileName()
{
return fileName;
}
public boolean isFolder()
{
return isFolder;
}
}