List of usage examples for com.liferay.portal.kernel.util StringPool SLASH
String SLASH
To view the source code for com.liferay.portal.kernel.util StringPool SLASH.
Click Source Link
From source file:org.opencps.util.PortletUtil.java
License:Open Source License
public static String getDossierDestinationFolder(long groupId, int year, int month, int day) { return String.valueOf(groupId) + StringPool.SLASH + "Dossiers" + StringPool.SLASH + String.valueOf(year) + StringPool.SLASH + String.valueOf(month) + StringPool.SLASH + String.valueOf(day); }
From source file:org.opencps.util.PortletUtil.java
License:Open Source License
public static String getDossierDestinationFolder(long groupId, int year, int month, int day, String oid) { return String.valueOf(groupId) + StringPool.SLASH + "Dossiers" + StringPool.SLASH + String.valueOf(year) + StringPool.SLASH + String.valueOf(month) + StringPool.SLASH + String.valueOf(day) + StringPool.SLASH + oid;// w w w . j av a 2 s .co m }
From source file:org.opencps.util.PortletUtil.java
License:Open Source License
public static String getEmployeeDestinationFolder(long groupId, long userId) { return String.valueOf(groupId) + StringPool.SLASH + "opencps/processmgtfiles/employee" + StringPool.SLASH + String.valueOf(userId); }
From source file:org.openinfinity.sso.springsecurity.liferay.PreAuthenticationAwareAutologinFilter.java
License:Apache License
protected void processFilter(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws Exception { HttpSession session = request.getSession(); String userID = (String) session.getAttribute(LIFERAY_USER_ID_SESSION_ATTRIBUTE_KEY); if (userID != null) { request = new LiferayRequestWrapper(request, userID); }/*from w ww . j a v a2s . com*/ String host = PortalUtil.getHost(request); if (PortalInstances.isAutoLoginIgnoreHost(host)) { if (_log.isDebugEnabled()) { _log.debug("Ignore host " + host); } processFilter(PreAuthenticationAwareAutologinFilter.class, request, response, filterChain); return; } String contextPath = PortalUtil.getPathContext(); String path = request.getRequestURI().toLowerCase(); if ((!contextPath.equals(StringPool.SLASH)) && (path.indexOf(contextPath) != -1)) { path = path.substring(contextPath.length(), path.length()); } if (PortalInstances.isAutoLoginIgnorePath(path)) { if (_log.isDebugEnabled()) { _log.debug("Ignore path " + path); } processFilter(PreAuthenticationAwareAutologinFilter.class, request, response, filterChain); return; } String remoteUser = request.getRemoteUser(); String jUserName = (String) session.getAttribute("j_username"); if (((remoteUser == null) && (jUserName == null)) || autoLoginNeedingValveAuthenticationIn(request, session)) { setValveAuthenticationAttributeToFalseIfNeededIn(request); for (AutoLogin autoLogin : _autoLogins) { try { String[] credentials = autoLogin.login(request, response); session.setAttribute(LIFERAY_USER_ID_SESSION_ATTRIBUTE_KEY, credentials[0]); String redirect = (String) request.getAttribute(AutoLogin.AUTO_LOGIN_REDIRECT); if (Validator.isNotNull(redirect)) { response.sendRedirect(redirect); return; } String loginRemoteUser = getLoginRemoteUser(request, response, session, credentials); if (loginRemoteUser != null) { request = new ProtectedServletRequest(request, loginRemoteUser); if (PropsValues.PORTAL_JAAS_ENABLE) { return; } redirect = (String) request.getAttribute(AutoLogin.AUTO_LOGIN_REDIRECT_AND_CONTINUE); if (Validator.isNotNull(redirect)) { response.sendRedirect(redirect); break; } } } catch (Exception e) { if (_log.isWarnEnabled()) { _log.warn(e, e); } String currentURL = PortalUtil.getCurrentURL(request); if (currentURL.endsWith(_PATH_CHAT_LATEST)) { if (_log.isWarnEnabled()) { _log.warn("Current URL " + currentURL + " generates exception: " + e.getMessage()); } } else { _log.error("Current URL " + currentURL + " generates exception: " + e.getMessage()); } } } } processFilter(PreAuthenticationAwareAutologinFilter.class, request, response, filterChain); }
From source file:se.gothiaforum.util.MembersRequestInterpreter.java
License:Open Source License
@Override protected SocialRequestFeedEntry doInterpret(SocialRequest request, ThemeDisplay themeDisplay) throws Exception { String creatorUserName = getUserName(request.getUserId(), themeDisplay); User creatorUser = UserLocalServiceUtil.getUserById(request.getUserId()); int requestType = request.getType(); Group group = null;// w w w . j av a 2s . c o m String className = request.getClassName(); if (className.equals(Group.class.getName())) { group = GroupLocalServiceUtil.getGroup(request.getClassPK()); } else { Organization organization = OrganizationLocalServiceUtil.getOrganization(request.getClassPK()); group = organization.getGroup(); } // Title String title = StringPool.BLANK; if (requestType == ADD_MEMBER) { StringBuilder sb = new StringBuilder(); sb.append("<a href=\""); sb.append(themeDisplay.getPortalURL()); sb.append(themeDisplay.getPathFriendlyURLPublic()); sb.append(StringPool.SLASH); sb.append(creatorUser.getScreenName()); sb.append("/profile\">"); sb.append(creatorUserName); sb.append("</a>"); String creatorUserNameURL = sb.toString(); sb = new StringBuilder(); sb.append("<a href=\""); sb.append(themeDisplay.getPortalURL()); sb.append(themeDisplay.getPathFriendlyURLPublic()); sb.append(group.getFriendlyURL()); sb.append("/profile\">"); sb.append(group.getDescriptiveName()); sb.append("</a>"); String organizationNameURL = sb.toString(); title = themeDisplay.translate("request-social-networking-summary-join-organization", new Object[] { creatorUserNameURL, organizationNameURL }); } // Body String body = StringPool.BLANK; return new SocialRequestFeedEntry(title, body); }