List of usage examples for com.liferay.portal.kernel.util StringPool EQUAL
String EQUAL
To view the source code for com.liferay.portal.kernel.util StringPool EQUAL.
Click Source Link
From source file:com.liferay.frontend.taglib.form.navigator.internal.osgi.commands.FormNavigatorOSGiCommands.java
License:Open Source License
private String _getCategoryLine(String formNavigatorId, String formNavigatorCategoryKey) { List<FormNavigatorEntry> formNavigatorEntries = _formNavigatorEntriesMap .getService(_getKey(formNavigatorId, formNavigatorCategoryKey)); if (formNavigatorEntries == null) { return StringPool.BLANK; }// ww w. j av a2s . c o m Stream<FormNavigatorEntry> formNavigatorEntriesStream = formNavigatorEntries.stream(); Stream<String> formNavigatorKeysStream = formNavigatorEntriesStream.map(FormNavigatorEntry::getKey); String formNavigatorEntryKeysCSV = formNavigatorKeysStream.collect(_collectorCSV); StringBundler sb = new StringBundler(4); if (Validator.isNotNull(formNavigatorCategoryKey)) { sb.append(formNavigatorCategoryKey); sb.append(StringPool.EQUAL); } sb.append(formNavigatorEntryKeysCSV); sb.append(StringPool.NEW_LINE); return sb.toString(); }
From source file:com.liferay.google.apps.connector.GHelperUtil.java
License:Open Source License
public static String getErrorMessage(Document document) { Element rootElement = document.getRootElement(); Element errorElement = rootElement.element("error"); List<Attribute> attributes = errorElement.attributes(); StringBundler sb = new StringBundler(attributes.size() * 4 + 1); sb.append(StringPool.OPEN_CURLY_BRACE); for (int i = 0; i < attributes.size(); i++) { Attribute attribute = attributes.get(i); sb.append(attribute.getName());/* w w w . j a v a 2 s . c o m*/ sb.append(StringPool.EQUAL); sb.append(attribute.getValue()); if ((i + 1) <= attributes.size()) { sb.append(StringPool.COMMA_AND_SPACE); } } sb.append(StringPool.CLOSE_CURLY_BRACE); return sb.toString(); }
From source file:com.liferay.gs.hack.service.persistence.TimesheetTaskDurationPK.java
License:Open Source License
@Override public String toString() { StringBundler sb = new StringBundler(15); sb.append(StringPool.OPEN_CURLY_BRACE); sb.append("timesheetTaskDurationId"); sb.append(StringPool.EQUAL); sb.append(timesheetTaskDurationId);/* w w w . ja v a 2 s . co m*/ sb.append(StringPool.COMMA); sb.append(StringPool.SPACE); sb.append("timesheetId"); sb.append(StringPool.EQUAL); sb.append(timesheetId); sb.append(StringPool.COMMA); sb.append(StringPool.SPACE); sb.append("timesheetTaskId"); sb.append(StringPool.EQUAL); sb.append(timesheetTaskId); sb.append(StringPool.CLOSE_CURLY_BRACE); return sb.toString(); }
From source file:com.liferay.gs.hack.service.persistence.TimesheetTaskPK.java
License:Open Source License
@Override public String toString() { StringBundler sb = new StringBundler(15); sb.append(StringPool.OPEN_CURLY_BRACE); sb.append("timesheetTaskId"); sb.append(StringPool.EQUAL); sb.append(timesheetTaskId);/*ww w .java2s .c o m*/ sb.append(StringPool.COMMA); sb.append(StringPool.SPACE); sb.append("timesheetId"); sb.append(StringPool.EQUAL); sb.append(timesheetId); sb.append(StringPool.COMMA); sb.append(StringPool.SPACE); sb.append("projectTaskId"); sb.append(StringPool.EQUAL); sb.append(projectTaskId); sb.append(StringPool.CLOSE_CURLY_BRACE); return sb.toString(); }
From source file:com.liferay.iframe.web.internal.display.context.IFrameDisplayContext.java
License:Open Source License
public List<KeyValuePair> getHiddenVariableKVPs() { List<KeyValuePair> hiddenVariableKVPs = new ArrayList<>(); List<String> hiddenVariables = ListUtil.toList(StringUtil.split(getHiddenVariables(), CharPool.SEMICOLON)); hiddenVariables.addAll(getIFrameVariables()); for (String hiddenVariable : hiddenVariables) { String key = StringPool.BLANK; String value = StringPool.BLANK; int pos = hiddenVariable.indexOf(StringPool.EQUAL); if (pos != -1) { key = hiddenVariable.substring(0, pos); value = hiddenVariable.substring(pos + 1); }/* w w w . ja va 2 s. c om*/ hiddenVariableKVPs.add(new KeyValuePair(key, value)); } return hiddenVariableKVPs; }
From source file:com.liferay.iframe.web.internal.display.context.IFrameDisplayContext.java
License:Open Source License
public List<String> getIFrameVariables() { List<String> iFrameVariables = new ArrayList<>(); Enumeration<String> enu = _request.getParameterNames(); while (enu.hasMoreElements()) { String name = enu.nextElement(); if (name.startsWith(_IFRAME_PREFIX)) { iFrameVariables.add(/*from w ww.ja v a 2s . c om*/ name.substring(_IFRAME_PREFIX.length()) + StringPool.EQUAL + _request.getParameter(name)); } } return iFrameVariables; }
From source file:com.liferay.iframe.web.internal.display.context.IFrameDisplayContext.java
License:Open Source License
public String getPassword() throws PortalException { if (_password != null) { return _password; }/*from w w w . ja v a 2s . co m*/ String authType = getAuthType(); if (authType.equals("basic")) { _password = _iFramePortletInstanceConfiguration.basicPassword(); } else { _password = _iFramePortletInstanceConfiguration.formPassword(); } if (Validator.isNull(_password)) { return StringPool.BLANK; } String passwordField = _iFramePortletInstanceConfiguration.passwordField(); if (Validator.isNull(passwordField)) { int pos = _password.indexOf(StringPool.EQUAL); if (pos != -1) { String fieldValuePair = _password; passwordField = fieldValuePair.substring(0, pos); _password = fieldValuePair.substring(pos + 1); } } if (Validator.isNotNull(passwordField)) { _password = IFrameUtil.getPassword(_request, _password); } return _password; }
From source file:com.liferay.iframe.web.internal.display.context.IFrameDisplayContext.java
License:Open Source License
public String getUserName() throws PortalException { if (_userName != null) { return _userName; }/*from w w w. ja va 2 s . c o m*/ String authType = getAuthType(); if (authType.equals("basic")) { _userName = _iFramePortletInstanceConfiguration.basicUserName(); } else { _userName = _iFramePortletInstanceConfiguration.formUserName(); } if (Validator.isNull(_userName)) { return StringPool.BLANK; } String userNameField = _iFramePortletInstanceConfiguration.userNameField(); if (Validator.isNull(userNameField)) { int pos = _userName.indexOf(StringPool.EQUAL); if (pos != -1) { String fieldValuePair = _userName; userNameField = fieldValuePair.substring(0, pos); _userName = fieldValuePair.substring(pos + 1); } } if (Validator.isNotNull(userNameField)) { _userName = IFrameUtil.getUserName(_request, _userName); } return _userName; }
From source file:com.liferay.journal.internal.util.impl.JournalConverterImpl.java
License:Open Source License
protected Element fetchMetadataEntry(Element parentElement, String attributeName, String attributeValue) { StringBundler sb = new StringBundler(5); sb.append("entry[@"); sb.append(attributeName);//from w ww . j a v a 2 s . c o m sb.append(StringPool.EQUAL); sb.append(HtmlUtil.escapeXPathAttribute(attributeValue)); sb.append(StringPool.CLOSE_BRACKET); XPath xPathSelector = SAXReaderUtil.createXPath(sb.toString()); return (Element) xPathSelector.selectSingleNode(parentElement); }
From source file:com.liferay.knowledgebase.admin.importer.util.KBArticleMarkdownConverter.java
License:Open Source License
protected String getUrlTitle(String heading) { String urlTitle = null;//from w w w . j a v a 2s . c o m int x = heading.indexOf("[](id="); int y = heading.indexOf(StringPool.CLOSE_PARENTHESIS, x); if (y > (x + 1)) { int equalsSign = heading.indexOf(StringPool.EQUAL, x); urlTitle = heading.substring(equalsSign + 1, y); urlTitle = StringUtil.replace(urlTitle, StringPool.SPACE, StringPool.DASH); urlTitle = StringUtil.toLowerCase(urlTitle); } if (!urlTitle.startsWith(StringPool.SLASH)) { urlTitle = StringPool.SLASH + urlTitle; } return urlTitle; }