當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。