List of usage examples for com.liferay.portal.kernel.util StringPool NULL
String NULL
To view the source code for com.liferay.portal.kernel.util StringPool NULL.
Click Source Link
From source file:com.liferay.marketplace.service.persistence.test.ModulePersistenceTest.java
License:Open Source License
@Test public void testCountByA_CN() throws Exception { _persistence.countByA_CN(RandomTestUtil.nextLong(), StringPool.BLANK); _persistence.countByA_CN(0L, StringPool.NULL); _persistence.countByA_CN(0L, (String) null); }
From source file:com.liferay.marketplace.service.persistence.test.ModulePersistenceTest.java
License:Open Source License
@Test public void testCountByA_BSN_BV() throws Exception { _persistence.countByA_BSN_BV(RandomTestUtil.nextLong(), StringPool.BLANK, StringPool.BLANK); _persistence.countByA_BSN_BV(0L, StringPool.NULL, StringPool.NULL); _persistence.countByA_BSN_BV(0L, (String) null, (String) null); }
From source file:com.liferay.micro.maintainance.analysis.service.persistence.test.AnalysisUserPersistenceTest.java
License:Open Source License
@Test public void testCountByUserName() throws Exception { _persistence.countByUserName(StringPool.BLANK); _persistence.countByUserName(StringPool.NULL); _persistence.countByUserName((String) null); }
From source file:com.liferay.micro.maintainance.decision.service.persistence.test.DecisionEntryPersistenceTest.java
License:Open Source License
@Test public void testCountByOutcome() throws Exception { _persistence.countByOutcome(StringPool.BLANK); _persistence.countByOutcome(StringPool.NULL); _persistence.countByOutcome((String) null); }
From source file:com.liferay.micro.maintainance.decision.service.persistence.test.DecisionEntryPersistenceTest.java
License:Open Source License
@Test public void testCountByWikiPageName() throws Exception { _persistence.countByWikiPageName(StringPool.BLANK); _persistence.countByWikiPageName(StringPool.NULL); _persistence.countByWikiPageName((String) null); }
From source file:com.liferay.micro.maintainance.task.service.persistence.test.TaskEntryPersistenceTest.java
License:Open Source License
@Test public void testCountByTasksByName() throws Exception { _persistence.countByTasksByName(StringPool.BLANK); _persistence.countByTasksByName(StringPool.NULL); _persistence.countByTasksByName((String) null); }
From source file:com.liferay.monitoring.service.persistence.MetricPersistenceTest.java
License:Open Source License
@Test public void testCountByUuid() { try {// ww w.ja va 2 s .co m _persistence.countByUuid(StringPool.BLANK); _persistence.countByUuid(StringPool.NULL); _persistence.countByUuid((String) null); } catch (Exception e) { Assert.fail(e.getMessage()); } }
From source file:com.liferay.portlet.login.util.LoginUtil.java
License:Open Source License
public static String getLogin(HttpServletRequest request, String paramName, Company company) throws SystemException { String login = request.getParameter(paramName); if ((login == null) || login.equals(StringPool.NULL)) { login = GetterUtil.getString(CookieKeys.getCookie(request, CookieKeys.LOGIN, false)); if (PropsValues.COMPANY_LOGIN_PREPOPULATE_DOMAIN && Validator.isNull(login) && company.getAuthType().equals(CompanyConstants.AUTH_TYPE_EA)) { login = "@" + company.getMx(); }/*ww w . j ava 2 s . c om*/ } return login; }
From source file:com.liferay.portlet.PortletRequestImpl.java
License:Open Source License
protected void mergePublicRenderParameters(DynamicServletRequest dynamicRequest, PortletPreferences preferences, long plid) { Enumeration<PublicRenderParameter> publicRenderParameters = Collections .enumeration(_portlet.getPublicRenderParameters()); while (publicRenderParameters.hasMoreElements()) { PublicRenderParameter publicRenderParameter = publicRenderParameters.nextElement(); String ignoreKey = PublicRenderParameterConfiguration.getIgnoreKey(publicRenderParameter); boolean ignoreValue = GetterUtil.getBoolean(preferences.getValue(ignoreKey, null)); if (ignoreValue) { continue; }//w w w . j a v a2 s.c o m String mappingKey = PublicRenderParameterConfiguration.getMappingKey(publicRenderParameter); String mappingValue = GetterUtil.getString(preferences.getValue(mappingKey, null)); HttpServletRequest request = (HttpServletRequest) dynamicRequest.getRequest(); String[] newValues = request.getParameterValues(mappingValue); if ((newValues != null) && (newValues.length != 0)) { newValues = ArrayUtil.remove(newValues, StringPool.NULL); } String name = publicRenderParameter.getIdentifier(); if ((newValues == null) || (newValues.length == 0)) { QName qName = publicRenderParameter.getQName(); String[] values = _publicRenderParameters.get(PortletQNameUtil.getPublicRenderParameterName(qName)); if ((values) == null || (values.length == 0) || (Validator.isNull(values[0]))) { continue; } if (dynamicRequest.getParameter(name) == null) { dynamicRequest.setParameterValues(name, values); } } else { dynamicRequest.setParameterValues(name, newValues); } } }
From source file:com.liferay.sync.util.SyncDLObjectUpdate.java
License:Open Source License
@Override public String toString() { StringBundler sb = new StringBundler((_syncDLObjects.size() * 78) + 5); sb.append("{\"lastAccessTime\":"); sb.append(_lastAccessTime);/* w w w . j av a2s .com*/ sb.append(",\"resultsTotal\":"); sb.append(_resultsTotal); sb.append(",\"syncDLObjects\":["); for (int i = 0; i < _syncDLObjects.size(); i++) { SyncDLObject syncDLObject = _syncDLObjects.get(i); sb.append("{\"changeLog\":"); append(sb, syncDLObject.getChangeLog(), true); sb.append(",\"checksum\":"); append(sb, syncDLObject.getChecksum(), false); sb.append(",\"companyId\":"); sb.append(syncDLObject.getCompanyId()); sb.append(",\"createTime\":"); sb.append(syncDLObject.getCreateTime()); sb.append(",\"description\":"); append(sb, syncDLObject.getDescription(), true); sb.append(",\"event\":"); append(sb, syncDLObject.getEvent(), false); sb.append(",\"extension\":"); append(sb, syncDLObject.getExtension(), true); sb.append(",\"extraSettings\":"); append(sb, syncDLObject.getExtraSettings(), true); sb.append(",\"lockExpirationDate\":"); Date lockExpirationDate = syncDLObject.getLockExpirationDate(); if (lockExpirationDate != null) { sb.append(lockExpirationDate.getTime()); } else { sb.append(StringPool.NULL); } sb.append(",\"lockUserId\":"); sb.append(syncDLObject.getLockUserId()); sb.append(",\"lockUserName\":"); append(sb, syncDLObject.getLockUserName(), true); sb.append(",\"mimeType\":"); append(sb, syncDLObject.getMimeType(), true); sb.append(",\"modifiedTime\":"); sb.append(syncDLObject.getModifiedTime()); sb.append(",\"name\":"); append(sb, syncDLObject.getName(), true); sb.append(",\"parentFolderId\":"); sb.append(syncDLObject.getParentFolderId()); sb.append(",\"repositoryId\":"); sb.append(syncDLObject.getRepositoryId()); sb.append(",\"size\":"); sb.append(syncDLObject.getSize()); sb.append(",\"syncDLObjectId\":"); sb.append(syncDLObject.getSyncDLObjectId()); sb.append(",\"type\":"); append(sb, syncDLObject.getType(), false); sb.append(",\"typePK\":"); sb.append(syncDLObject.getTypePK()); sb.append(",\"typeUuid\":"); append(sb, syncDLObject.getTypeUuid(), false); sb.append(",\"userId\":"); sb.append(syncDLObject.getUserId()); sb.append(",\"userName\":"); append(sb, syncDLObject.getUserName(), true); sb.append(",\"version\":"); append(sb, syncDLObject.getVersion(), false); sb.append(",\"versionId\":"); sb.append(syncDLObject.getVersionId()); sb.append(StringPool.CLOSE_CURLY_BRACE); if (i != (_syncDLObjects.size() - 1)) { sb.append(StringPool.COMMA); } } sb.append("]}"); return sb.toString(); }