public class DocLibraryUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
WF_DOCUMENT_EXTENSION |
static String |
WORKFLOWS_FOLDER |
Constructor and Description |
---|
DocLibraryUtil() |
Modifier and Type | Method and Description |
---|---|
static long |
getCompanyID() |
static String |
getFileNameWithoutExt(String fileTitle) |
static List<com.liferay.portlet.documentlibrary.model.DLFolder> |
getFolders(org.gcube.application.framework.core.session.ASLSession session) |
static long |
getGroupID(org.gcube.application.framework.core.session.ASLSession session) |
static String[] |
getPermissionsFromWfStep(com.liferay.portal.model.Role role,
org.gcube.portlets.admin.wfdocslibrary.shared.Step step) |
static long |
getUserId(org.gcube.application.framework.core.session.ASLSession session) |
static long |
getWfFolder(org.gcube.application.framework.core.session.ASLSession session)
check the existence of the WFFolder or create it if not exists
|
static boolean |
wfFolderExists(org.gcube.application.framework.core.session.ASLSession session) |
static boolean |
writeFileIntoDocLibrary(org.gcube.application.framework.core.session.ASLSession session,
List<com.liferay.portal.model.Role> roles,
org.gcube.portlets.admin.wfdocslibrary.shared.Step start,
String fileName,
byte[] buffer)
write the Report File (payload) into Liferay DocLibrary in the workflowdocs folder
|
public static final String WORKFLOWS_FOLDER
public static String WF_DOCUMENT_EXTENSION
public static boolean writeFileIntoDocLibrary(org.gcube.application.framework.core.session.ASLSession session, List<com.liferay.portal.model.Role> roles, org.gcube.portlets.admin.wfdocslibrary.shared.Step start, String fileName, byte[] buffer)
roles
- start
- each Step contains a MapfileName
- buffer
- the payload as byte arraypublic static String[] getPermissionsFromWfStep(com.liferay.portal.model.Role role, org.gcube.portlets.admin.wfdocslibrary.shared.Step step)
role
- is the liferay role, for convention is created as ROLENAME_WFID e.g. EDITOR_123step
- containts the permissions attached to each role (just the name, e.g. EDITOR)public static String getFileNameWithoutExt(String fileTitle)
fileTitle
- public static long getWfFolder(org.gcube.application.framework.core.session.ASLSession session) throws Exception
session
- com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
Exception
public static boolean wfFolderExists(org.gcube.application.framework.core.session.ASLSession session)
session
- the ASL Session instancepublic static long getGroupID(org.gcube.application.framework.core.session.ASLSession session) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
session
- com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
public static long getCompanyID() throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException
com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.SystemException
public static List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(org.gcube.application.framework.core.session.ASLSession session) throws com.liferay.portal.kernel.exception.SystemException, com.liferay.portal.kernel.exception.PortalException
session
- the ASL Session instancecom.liferay.portal.kernel.exception.SystemException
- .com.liferay.portal.kernel.exception.PortalException
- .public static long getUserId(org.gcube.application.framework.core.session.ASLSession session)
session
- the ASL Session instanceCopyright © 2014. All Rights Reserved.