Example usage for com.liferay.portal.util PropsValues DL_FILE_ENTRY_COMMENTS_ENABLED

List of usage examples for com.liferay.portal.util PropsValues DL_FILE_ENTRY_COMMENTS_ENABLED

Introduction

In this page you can find the example usage for com.liferay.portal.util PropsValues DL_FILE_ENTRY_COMMENTS_ENABLED.

Prototype

boolean DL_FILE_ENTRY_COMMENTS_ENABLED

To view the source code for com.liferay.portal.util PropsValues DL_FILE_ENTRY_COMMENTS_ENABLED.

Click Source Link

Usage

From source file:com.liferay.document.library.web.asset.DLFileEntryAssetRenderer.java

License:Open Source License

@Override
public String getDiscussionPath() {
    if (PropsValues.DL_FILE_ENTRY_COMMENTS_ENABLED) {
        return "edit_file_entry_discussion";
    } else {/*  w  w  w.  j  av  a  2  s  . c o  m*/
        return null;
    }
}

From source file:com.liferay.portlet.documentlibrary.service.impl.DLAppHelperLocalServiceImpl.java

License:Open Source License

public void addFileEntry(long userId, FileEntry fileEntry, FileVersion fileVersion,
        ServiceContext serviceContext) throws PortalException, SystemException {

    updateAsset(userId, fileEntry, fileVersion, serviceContext.getAssetCategoryIds(),
            serviceContext.getAssetTagNames(), serviceContext.getAssetLinkEntryIds());

    if (PropsValues.DL_FILE_ENTRY_COMMENTS_ENABLED) {
        mbMessageLocalService.addDiscussionMessage(fileEntry.getUserId(), fileEntry.getUserName(),
                fileEntry.getGroupId(), DLFileEntryConstants.getClassName(), fileEntry.getFileEntryId(),
                WorkflowConstants.ACTION_PUBLISH);
    }//from w  ww.  j av a2 s.  c  o m

    if (fileVersion instanceof LiferayFileVersion) {
        DLFileVersion dlFileVersion = (DLFileVersion) fileVersion.getModel();

        Map<String, Serializable> workflowContext = new HashMap<String, Serializable>();

        workflowContext.put("event", DLSyncConstants.EVENT_ADD);

        WorkflowHandlerRegistryUtil.startWorkflowInstance(dlFileVersion.getCompanyId(),
                dlFileVersion.getGroupId(), userId, DLFileEntry.class.getName(),
                dlFileVersion.getFileVersionId(), dlFileVersion, serviceContext, workflowContext);
    }

    registerDLProcessorCallback(fileEntry);
}