当前位置: 首页>>代码示例>>Java>>正文


Java StringPool类代码示例

本文整理汇总了Java中com.liferay.portal.kernel.util.StringPool的典型用法代码示例。如果您正苦于以下问题:Java StringPool类的具体用法?Java StringPool怎么用?Java StringPool使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StringPool类属于com.liferay.portal.kernel.util包,在下文中一共展示了StringPool类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createReportPDFFile

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * @param jrxmlTemplate
 * @param jsonData
 * @param parameters
 * @param outputDestination
 * @param exportName
 * @return
 */
public static String createReportPDFFile(String jrxmlTemplate, String jsonData, Map<String, Object> parameters,
		String outputDestination, String exportName) {

	String sourceFileName = outputDestination + exportName;
	try {
		// fix json enter char
		jsonData = quoteHTML(jsonData);
		JasperReport reportTemplate = JRReportTemplate.getJasperReport(jrxmlTemplate);
		JRJSONDataSource dataSource = JRJSONDataSource.getInstance(jsonData);

		JasperPrint jasperPrint = getJasperPrint(reportTemplate, parameters, dataSource);

		return exportPdfFile(jasperPrint, sourceFileName);
	} catch (Exception e) {
		_log.error(e);

		return StringPool.BLANK;

	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:29,代码来源:JRReportUtil.java

示例2: getStatusMessageKey

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
protected String getStatusMessageKey() {
    if (Validator.isNotNull(_messageKey)) {
        return _messageKey;
    }

    _messageKey = StringPool.BLANK;

    if (hasRemoteMessage()) {
        _messageKey = "please-wait-as-the-publication-processes-on-the-remote-site";
    } else if (hasStagedModelMessage()) {
        _messageKey = "exporting";

        if (Objects.equals(_cmd, Constants.IMPORT)) {
            _messageKey = "importing";
        } else if (Objects.equals(_cmd, Constants.PUBLISH_TO_LIVE)
                || Objects.equals(_cmd, Constants.PUBLISH_TO_REMOTE)) {

            _messageKey = "publishing";
        }
    }

    return _messageKey;
}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:24,代码来源:ExportImportBackgroundTaskDisplay.java

示例3: findByF_dictGroupId_First

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the first dict item group in the ordered set where groupId = &#63; and dictGroupId = &#63;.
 *
 * @param groupId the group ID
 * @param dictGroupId the dict group ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching dict item group
 * @throws NoSuchDictItemGroupException if a matching dict item group could not be found
 */
@Override
public DictItemGroup findByF_dictGroupId_First(long groupId,
	long dictGroupId, OrderByComparator<DictItemGroup> orderByComparator)
	throws NoSuchDictItemGroupException {
	DictItemGroup dictItemGroup = fetchByF_dictGroupId_First(groupId,
			dictGroupId, orderByComparator);

	if (dictItemGroup != null) {
		return dictItemGroup;
	}

	StringBundler msg = new StringBundler(6);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("groupId=");
	msg.append(groupId);

	msg.append(", dictGroupId=");
	msg.append(dictGroupId);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchDictItemGroupException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:35,代码来源:DictItemGroupPersistenceImpl.java

示例4: findByUuid_C_First

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the first dict item group in the ordered set where uuid = &#63; and companyId = &#63;.
 *
 * @param uuid the uuid
 * @param companyId the company ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching dict item group
 * @throws NoSuchDictItemGroupException if a matching dict item group could not be found
 */
@Override
public DictItemGroup findByUuid_C_First(String uuid, long companyId,
	OrderByComparator<DictItemGroup> orderByComparator)
	throws NoSuchDictItemGroupException {
	DictItemGroup dictItemGroup = fetchByUuid_C_First(uuid, companyId,
			orderByComparator);

	if (dictItemGroup != null) {
		return dictItemGroup;
	}

	StringBundler msg = new StringBundler(6);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("uuid=");
	msg.append(uuid);

	msg.append(", companyId=");
	msg.append(companyId);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchDictItemGroupException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:35,代码来源:DictItemGroupPersistenceImpl.java

示例5: actionSaveFacetConfig

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * This action saves the Liferay facet configuration for a given tab
 *
 * @param request The request
 * @param response The response
 * @throws PortletException If something goes wrong
 * @throws IOException If something goes wrong
 */
@ProcessAction(name = ACTION_NAME_SAVE_FACET_CONFIG)
public void actionSaveFacetConfig(ActionRequest request, ActionResponse response) throws PortletException, IOException {
    String tabId = ParamUtil.get(request, PortletRequestParameter.TAB_ID.getName(), StringPool.BLANK);
    String facetClassName = ParamUtil.get(request, FORM_FIELD_FACET_CLASS_NAME, StringPool.BLANK);
    String redirectUrl = ParamUtil.get(request, FORM_FIELD_REDIRECT_URL, StringPool.BLANK);
    PortletPreferences preferences = request.getPreferences();
    FlashlightSearchConfiguration configuration = this.searchService.readConfiguration(preferences);
    SearchFacet targetFacet = this.getSearchFacetFromRequest(tabId, facetClassName, configuration);

    if(targetFacet != null) {
        JSONObject facetConfiguration = targetFacet.getJSONData(request);
        targetFacet.getFacetConfiguration().setDataJSONObject(facetConfiguration);
        this.searchService.saveSearchFacetConfig(configuration.getTabs().get(tabId), targetFacet, preferences);
        SessionMessages.add(request, SESSION_MESSAGE_CONFIG_SAVED);
        response.sendRedirect(redirectUrl);
    }
}
 
开发者ID:savoirfairelinux,项目名称:flashlight-search,代码行数:26,代码来源:FlashlightSearchPortlet.java

示例6: findByUuid_First

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the first voting result in the ordered set where uuid = &#63;.
 *
 * @param uuid the uuid
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching voting result
 * @throws NoSuchVotingResultException if a matching voting result could not be found
 */
@Override
public VotingResult findByUuid_First(String uuid,
	OrderByComparator<VotingResult> orderByComparator)
	throws NoSuchVotingResultException {
	VotingResult votingResult = fetchByUuid_First(uuid, orderByComparator);

	if (votingResult != null) {
		return votingResult;
	}

	StringBundler msg = new StringBundler(4);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("uuid=");
	msg.append(uuid);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchVotingResultException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:30,代码来源:VotingResultPersistenceImpl.java

示例7: findByF_dictCollectionByGroup_Last

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the last dict collection in the ordered set where groupId = &#63;.
 *
 * @param groupId the group ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the last matching dict collection
 * @throws NoSuchDictCollectionException if a matching dict collection could not be found
 */
@Override
public DictCollection findByF_dictCollectionByGroup_Last(long groupId,
	OrderByComparator<DictCollection> orderByComparator)
	throws NoSuchDictCollectionException {
	DictCollection dictCollection = fetchByF_dictCollectionByGroup_Last(groupId,
			orderByComparator);

	if (dictCollection != null) {
		return dictCollection;
	}

	StringBundler msg = new StringBundler(4);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("groupId=");
	msg.append(groupId);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchDictCollectionException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:31,代码来源:DictCollectionPersistenceImpl.java

示例8: findByUuid_First

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the first dict item in the ordered set where uuid = &#63;.
 *
 * @param uuid the uuid
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching dict item
 * @throws NoSuchDictItemException if a matching dict item could not be found
 */
@Override
public DictItem findByUuid_First(String uuid,
	OrderByComparator<DictItem> orderByComparator)
	throws NoSuchDictItemException {
	DictItem dictItem = fetchByUuid_First(uuid, orderByComparator);

	if (dictItem != null) {
		return dictItem;
	}

	StringBundler msg = new StringBundler(4);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("uuid=");
	msg.append(uuid);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchDictItemException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:30,代码来源:DictItemPersistenceImpl.java

示例9: getContent

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * @param dossierPartId
 * @param contentType
 * @return
 * @throws PortalException
 */
public String getContent(long dossierPartId, int contentType) throws PortalException {

	DossierPart object = dossierPartPersistence.fetchByPrimaryKey(dossierPartId);

	String content = StringPool.BLANK;

	if (contentType == 1) {
		content = object.getFormScript();
	}

	if (contentType == 2) {
		content = object.getFormReport();
	}

	if (contentType == 3) {
		content = object.getSampleData();
	}

	return content;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:27,代码来源:DossierPartLocalServiceImpl.java

示例10: doGetDocument

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
@Override
protected Document doGetDocument(DictGroup dictGroup) throws Exception {
	Document document = getBaseModelDocument(CLASS_NAME, dictGroup);

	document.addKeywordSortable(Field.COMPANY_ID, String.valueOf(dictGroup.getCompanyId()));
	document.addDateSortable(Field.MODIFIED_DATE, dictGroup.getModifiedDate());
	document.addKeywordSortable(Field.USER_ID, String.valueOf(dictGroup.getUserId()));
	document.addKeywordSortable(Field.USER_NAME, String.valueOf(dictGroup.getUserName()));

	document.addNumberSortable(DictGroupTerm.GROUP_ID, dictGroup.getGroupId());
	document.addNumberSortable(DictGroupTerm.DICT_GROUPID, dictGroup.getDictGroupId());
	document.addNumberSortable(DictGroupTerm.DICT_COLLECTIONID, dictGroup.getDictCollectionId());
	document.addTextSortable(DictGroupTerm.GROUP_CODE, dictGroup.getGroupCode());
	document.addTextSortable(DictGroupTerm.GROUP_NAME, dictGroup.getGroupName());
	document.addTextSortable(DictGroupTerm.GROUP_NAME_EN, dictGroup.getGroupNameEN());
	document.addTextSortable(DictGroupTerm.GROUP_DESCRIPTION, dictGroup.getGroupDescription());
	
	DictCollection dictCollection = DictCollectionLocalServiceUtil.fetchDictCollection(dictGroup.getDictCollectionId());
	
	String dictCollectionCode = Validator.isNotNull(dictCollection)?dictCollection.getCollectionCode():StringPool.BLANK;
	
	document.addTextSortable(DictGroupTerm.DICT_COLLECTION_CODE, dictCollectionCode);
	
	return document;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:26,代码来源:DictGroupIndexer.java

示例11: getDictItemName

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
protected String getDictItemName(long groupId, String collectionCode, String itemCode) {

		DictCollection dc = DictCollectionLocalServiceUtil.fetchByF_dictCollectionCode(collectionCode, groupId);

		String itemName = StringPool.BLANK;

		if (Validator.isNotNull(dc)) {
			DictItem it = DictItemLocalServiceUtil.fetchByF_dictItemCode(itemCode, dc.getPrimaryKey(), groupId);
			if (Validator.isNotNull(it)) {
				itemName = it.getItemName();
			} else {
				itemName = StringPool.BLANK;
			}
		}

		return itemName;
	}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:18,代码来源:ProcessStepIndexer.java

示例12: findByF_parentItemId_First

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the first dict item in the ordered set where parentItemId = &#63;.
 *
 * @param parentItemId the parent item ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching dict item
 * @throws NoSuchDictItemException if a matching dict item could not be found
 */
@Override
public DictItem findByF_parentItemId_First(long parentItemId,
	OrderByComparator<DictItem> orderByComparator)
	throws NoSuchDictItemException {
	DictItem dictItem = fetchByF_parentItemId_First(parentItemId,
			orderByComparator);

	if (dictItem != null) {
		return dictItem;
	}

	StringBundler msg = new StringBundler(4);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("parentItemId=");
	msg.append(parentItemId);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchDictItemException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:31,代码来源:DictItemPersistenceImpl.java

示例13: findByF_dictCollectionByGroup_First

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the first dict collection in the ordered set where groupId = &#63;.
 *
 * @param groupId the group ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching dict collection
 * @throws NoSuchDictCollectionException if a matching dict collection could not be found
 */
@Override
public DictCollection findByF_dictCollectionByGroup_First(long groupId,
	OrderByComparator<DictCollection> orderByComparator)
	throws NoSuchDictCollectionException {
	DictCollection dictCollection = fetchByF_dictCollectionByGroup_First(groupId,
			orderByComparator);

	if (dictCollection != null) {
		return dictCollection;
	}

	StringBundler msg = new StringBundler(4);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("groupId=");
	msg.append(groupId);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchDictCollectionException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:31,代码来源:DictCollectionPersistenceImpl.java

示例14: getTargetFolder

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
public static DLFolder getTargetFolder(
	long groupId, long parentFolderId, String destination) {

	DLFolder dlFolder = null;

	String[] folderNames =
		StringUtil.split(destination, StringPool.FORWARD_SLASH);

	if (folderNames != null && folderNames.length > 0) {
		String name = folderNames[0];
		dlFolder = getFolder(groupId, parentFolderId, name);
		folderNames = ArrayUtil.remove(folderNames, name);
		if (folderNames.length > 0) {
			dlFolder = getTargetFolder(
				groupId, dlFolder.getFolderId(),
				StringUtil.merge(folderNames, StringPool.FORWARD_SLASH));
		}

	}

	return dlFolder;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:23,代码来源:DLFolderUtil.java

示例15: findByF_dictCollectionId_First

import com.liferay.portal.kernel.util.StringPool; //导入依赖的package包/类
/**
 * Returns the first dict item in the ordered set where dictCollectionId = &#63;.
 *
 * @param dictCollectionId the dict collection ID
 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
 * @return the first matching dict item
 * @throws NoSuchDictItemException if a matching dict item could not be found
 */
@Override
public DictItem findByF_dictCollectionId_First(long dictCollectionId,
	OrderByComparator<DictItem> orderByComparator)
	throws NoSuchDictItemException {
	DictItem dictItem = fetchByF_dictCollectionId_First(dictCollectionId,
			orderByComparator);

	if (dictItem != null) {
		return dictItem;
	}

	StringBundler msg = new StringBundler(4);

	msg.append(_NO_SUCH_ENTITY_WITH_KEY);

	msg.append("dictCollectionId=");
	msg.append(dictCollectionId);

	msg.append(StringPool.CLOSE_CURLY_BRACE);

	throw new NoSuchDictItemException(msg.toString());
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:31,代码来源:DictItemPersistenceImpl.java


注:本文中的com.liferay.portal.kernel.util.StringPool类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。