rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public void init(FilterConfig filterConfig) throws ServletException { | public void init(FilterConfig config) throws ServletException { | public void init(FilterConfig filterConfig) throws ServletException { synchronized (FriendlyURLServlet.class) { ServletContext ctx = filterConfig.getServletContext(); _companyId = ctx.getInitParameter("company_id"); _pattern = GetterUtil.getInteger( filterConfig.getInitParameter("pattern")); if ((_pattern ... |
ServletContext ctx = filterConfig.getServletContext(); | ServletContext ctx = config.getServletContext(); | public void init(FilterConfig filterConfig) throws ServletException { synchronized (FriendlyURLServlet.class) { ServletContext ctx = filterConfig.getServletContext(); _companyId = ctx.getInitParameter("company_id"); _pattern = GetterUtil.getInteger( filterConfig.getInitParameter("pattern")); if ((_pattern ... |
filterConfig.getInitParameter("pattern")); | config.getInitParameter("pattern")); | public void init(FilterConfig filterConfig) throws ServletException { synchronized (FriendlyURLServlet.class) { ServletContext ctx = filterConfig.getServletContext(); _companyId = ctx.getInitParameter("company_id"); _pattern = GetterUtil.getInteger( filterConfig.getInitParameter("pattern")); if ((_pattern ... |
setModified(true); | public void setNodeId(String nodeId) { if (((nodeId == null) && (_nodeId != null)) || ((nodeId != null) && (_nodeId == null)) || ((nodeId != null) && (_nodeId != null) && !nodeId.equals(_nodeId))) { if (!XSS_ALLOW_NODEID) { nodeId = XSSUtil.strip(nodeId); } _nodeId = nodeId; setModified(true); } ... | |
account.setCompanyId(companyId); | account.setCompanyId(User.DEFAULT); | public Company updateCompany( String companyId, String portalURL, String homeURL, String mx, String name, String legalName, String legalId, String legalType, String sicCode, String tickerSymbol, String industry, String type, String size) throws PortalException, SystemException { // Company Date now = new Da... |
setModified(true); | public void setPortalURL(String portalURL) { if (((portalURL == null) && (_portalURL != null)) || ((portalURL != null) && (_portalURL == null)) || ((portalURL != null) && (_portalURL != null) && !portalURL.equals(_portalURL))) { if (!XSS_ALLOW_PORTALURL) { portalURL = XSSUtil.strip(portalURL); } _po... | |
setModified(true); | public void setHomeURL(String homeURL) { if (((homeURL == null) && (_homeURL != null)) || ((homeURL != null) && (_homeURL == null)) || ((homeURL != null) && (_homeURL != null) && !homeURL.equals(_homeURL))) { if (!XSS_ALLOW_HOMEURL) { homeURL = XSSUtil.strip(homeURL); } _homeURL = homeURL; setModi... | |
setModified(true); | public void setMx(String mx) { if (((mx == null) && (_mx != null)) || ((mx != null) && (_mx == null)) || ((mx != null) && (_mx != null) && !mx.equals(_mx))) { if (!XSS_ALLOW_MX) { mx = XSSUtil.strip(mx); } _mx = mx; setModified(true); } } | |
public static com.liferay.portal.model.Role getRole( java.lang.String companyId, java.lang.String name) | public static com.liferay.portal.model.Role getRole(java.lang.String roleId) | public static com.liferay.portal.model.Role getRole( java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { RoleLocalService roleLocalService = RoleLocalServiceFactory.getService(); return roleLocalService.getRole(companyId, na... |
return roleLocalService.getRole(companyId, name); | return roleLocalService.getRole(roleId); | public static com.liferay.portal.model.Role getRole( java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { RoleLocalService roleLocalService = RoleLocalServiceFactory.getService(); return roleLocalService.getRole(companyId, na... |
setModified(true); | public void setLegalName(String legalName) { if (((legalName == null) && (_legalName != null)) || ((legalName != null) && (_legalName == null)) || ((legalName != null) && (_legalName != null) && !legalName.equals(_legalName))) { if (!XSS_ALLOW_LEGALNAME) { legalName = XSSUtil.strip(legalName); } _le... | |
setModified(true); | public void setLegalId(String legalId) { if (((legalId == null) && (_legalId != null)) || ((legalId != null) && (_legalId == null)) || ((legalId != null) && (_legalId != null) && !legalId.equals(_legalId))) { if (!XSS_ALLOW_LEGALID) { legalId = XSSUtil.strip(legalId); } _legalId = legalId; setModi... | |
setModified(true); | public void setLegalType(String legalType) { if (((legalType == null) && (_legalType != null)) || ((legalType != null) && (_legalType == null)) || ((legalType != null) && (_legalType != null) && !legalType.equals(_legalType))) { if (!XSS_ALLOW_LEGALTYPE) { legalType = XSSUtil.strip(legalType); } _le... | |
setModified(true); | public void setSicCode(String sicCode) { if (((sicCode == null) && (_sicCode != null)) || ((sicCode != null) && (_sicCode == null)) || ((sicCode != null) && (_sicCode != null) && !sicCode.equals(_sicCode))) { if (!XSS_ALLOW_SICCODE) { sicCode = XSSUtil.strip(sicCode); } _sicCode = sicCode; setModi... | |
setModified(true); | public void setTickerSymbol(String tickerSymbol) { if (((tickerSymbol == null) && (_tickerSymbol != null)) || ((tickerSymbol != null) && (_tickerSymbol == null)) || ((tickerSymbol != null) && (_tickerSymbol != null) && !tickerSymbol.equals(_tickerSymbol))) { if (!XSS_ALLOW_TICKERSYMBOL) { tickerSymbol =... | |
setModified(true); | public void setIndustry(String industry) { if (((industry == null) && (_industry != null)) || ((industry != null) && (_industry == null)) || ((industry != null) && (_industry != null) && !industry.equals(_industry))) { if (!XSS_ALLOW_INDUSTRY) { industry = XSSUtil.strip(industry); } _industry = indu... | |
setModified(true); | public void setType(String type) { if (((type == null) && (_type != null)) || ((type != null) && (_type == null)) || ((type != null) && (_type != null) && !type.equals(_type))) { if (!XSS_ALLOW_TYPE) { type = XSSUtil.strip(type); } _type = type; setModified(true); } } | |
setModified(true); | public void setSize(String size) { if (((size == null) && (_size != null)) || ((size != null) && (_size == null)) || ((size != null) && (_size != null) && !size.equals(_size))) { if (!XSS_ALLOW_SIZE) { size = XSSUtil.strip(size); } _size = size; setModified(true); } } | |
catch (NoSuchLayoutException nsle) { _log.warn(nsle); } | private String _getPlid( String pathInfo, String servletPath, String defaultPlid) { if (_pattern == _PATTERN_LAYOUT) { return defaultPlid; } if (Validator.isNull(pathInfo) || !pathInfo.startsWith(StringPool.SLASH)) { return null; } // Group friendly URL String friendlyURL = null; int pos = pathInfo.index... | |
if (!layout.getType().equals(Layout.TYPE_PORTLET)) { return false; } | private boolean _isCacheable(HttpServletRequest req) { if (_pattern == _PATTERN_RESOURCE) { return true; } try { String plid = _getPlid( req.getPathInfo(), req.getServletPath(), ParamUtil.getString(req, "p_l_id")); String layoutId = Layout.getLayoutId(plid); String ownerId = Layout.getOwnerId(plid); ... | |
} else if (cmd.equals("security")) { updateSecurity(req); | public void processAction( ActionMapping mapping, ActionForm form, PortletConfig config, ActionRequest req, ActionResponse res) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); try { if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) { updateCompany(req); } else if (... | |
CyrusUser model = null; | public CyrusUser findByPrimaryKey(String userId) throws NoSuchCyrusUserException, SystemException { CyrusUser model = null; Session session = null; try { session = getSessionFactory().openSession(); CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, userId); model = model(hbm); return mo... | |
CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, userId); model = model(hbm); return model; | return (CyrusUser)session.load(CyrusUser.class, userId); | public CyrusUser findByPrimaryKey(String userId) throws NoSuchCyrusUserException, SystemException { CyrusUser model = null; Session session = null; try { session = getSessionFactory().openSession(); CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, userId); model = model(hbm); return mo... |
CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, userId); | CyrusUser user = (CyrusUser)session.load(CyrusUser.class, userId); | public void remove(String userId) throws NoSuchCyrusUserException, SystemException { Session session = null; try { session = getSessionFactory().openSession(); CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, userId); session.delete(hbm); session.flush(); } catch (HibernateException h... |
session.delete(hbm); | session.delete(user); | public void remove(String userId) throws NoSuchCyrusUserException, SystemException { Session session = null; try { session = getSessionFactory().openSession(); CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, userId); session.delete(hbm); session.flush(); } catch (HibernateException h... |
CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, user.getUserId()); | CyrusUser userModel = (CyrusUser)session.load( CyrusUser.class, user.getUserId()); | public void update(CyrusUser user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, user.getUserId()); hbm.setPassword(user.getPassword()); session.flush(); } catch (Object... |
hbm.setPassword(user.getPassword()); | userModel.setPassword(user.getPassword()); | public void update(CyrusUser user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, user.getUserId()); hbm.setPassword(user.getPassword()); session.flush(); } catch (Object... |
CyrusUserHBM hbm = new CyrusUserHBM( | CyrusUser userModel = new CyrusUser( | public void update(CyrusUser user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, user.getUserId()); hbm.setPassword(user.getPassword()); session.flush(); } catch (Object... |
session.save(hbm); | session.save(userModel); | public void update(CyrusUser user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusUserHBM hbm = (CyrusUserHBM)session.load( CyrusUserHBM.class, user.getUserId()); hbm.setPassword(user.getPassword()); session.flush(); } catch (Object... |
if (userGroup.isNew() || userGroup.isModified()) { session = openSession(); if (userGroup.isNew()) { UserGroup userGroupModel = new UserGroup(); userGroupModel.setUserGroupId(userGroup.getUserGroupId()); userGroupModel.setCompanyId(userGroup.getCompanyId()); userGroupModel.setParentUserGroupId(userGroup.getParentUserG... | session = openSession(); session.saveOrUpdate(userGroup); session.flush(); userGroup.setNew(false); | public com.liferay.portal.model.UserGroup update( com.liferay.portal.model.UserGroup userGroup) throws SystemException { Session session = null; try { if (userGroup.isNew() || userGroup.isModified()) { session = openSession(); if (userGroup.isNew()) { UserGroup userGroupModel = new UserGroup(); user... |
if (!User.isDefaultUser(userId)) { GroupLocalServiceUtil.addGroup( user.getUserId(), User.class.getName(), user.getPrimaryKey().toString(), null, null); } | private void _upgradeUser() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_USER); rs = ps.executeQuery(); while (rs.next()) { String userId = rs.getString("userId"... | |
CUSTOM_SQL_FUNCTION_ISNULL + "(?, 1) = 1", CUSTOM_SQL_FUNCTION_ISNULL + "(?, 1) = 0"}); | CUSTOM_SQL_FUNCTION_ISNULL + "(?, '1') = '1'", CUSTOM_SQL_FUNCTION_ISNULL + "(?, '1') = '0'"}); | public static String replaceIsNull(String sql) { if (Validator.isNotNull(CUSTOM_SQL_FUNCTION_ISNULL)) { sql = StringUtil.replace( sql, new String[] { "? IS NULL", "? IS NOT NULL"}, new String[] { CUSTOM_SQL_FUNCTION_ISNULL + "(?, 1) = 1", CUSTOM_SQL_FUNCTION_ISNULL + "(?, 1) = 0"}); } return ... |
RenderResponse renderResponse) { | PortletResponse portletResponse) { | public PortletServletResponse(HttpServletResponse res, RenderResponse renderResponse) { super(res); _renderResponse = renderResponse; } |
_renderResponse = renderResponse; | _portletResponse = portletResponse; if (_portletResponse instanceof ActionResponse) { _isAction = true; } else { _isAction = false; } | public PortletServletResponse(HttpServletResponse res, RenderResponse renderResponse) { super(res); _renderResponse = renderResponse; } |
public void deleteLayout(com.liferay.portal.model.Layout layout, boolean updateLayoutSet) | public void deleteLayout(java.lang.String layoutId, java.lang.String ownerId) | public void deleteLayout(com.liferay.portal.model.Layout layout, boolean updateLayoutSet) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
int value = article1.getDisplayDate().compareTo(article2.getDisplayDate()); | int value = DateUtil.compareTo( article1.getDisplayDate(), article2.getDisplayDate()); | public int compare(Object obj1, Object obj2) { JournalArticle article1 = (JournalArticle)obj1; JournalArticle article2 = (JournalArticle)obj2; int value = article1.getDisplayDate().compareTo(article2.getDisplayDate()); if (_asc) { return value; } else { return -value; } } |
if (!appServerType.startsWith("jboss") && | if (!appServerType.startsWith("geronimo") && !appServerType.startsWith("jboss") && | protected void checkArguments() { if (Validator.isNull(baseDir)) { throw new IllegalArgumentException( "The system property deployer.base.dir is not set"); } if (Validator.isNull(destDir)) { throw new IllegalArgumentException( "The system property deployer.dest.dir is not set"); } if (Validator.isNull(a... |
if (Validator.isNull(fileName)) { return new String[0]; } | public static String[] listFiles(String fileName) throws IOException { return listFiles(new File(fileName)); } | |
if (portlet == null) { _log.warn( "Returning preferences for a portlet that does not exist"); return PortletPreferencesSerializer.fromXML( companyId, pk, Portlet.DEFAULT_PREFERENCES); } | public javax.portlet.PortletPreferences getPreferences( String companyId, PortletPreferencesPK pk) throws PortalException, SystemException { Map prefsPool = PortletPreferencesLocalUtil.getPreferencesPool( pk.ownerId); PortletPreferencesImpl prefs = (PortletPreferencesImpl)prefsPool.get(pk); if (prefs == null... | |
(upgradeProcess.getThreshold() > buildNumber)) { | (upgradeProcess.getThreshold() >= buildNumber)) { | public void run(String[] ids) throws ActionException { try { // Print release information System.out.println("Starting " + ReleaseInfo.getReleaseInfo()); // Keep track of uptime SimpleCachePool.put( StartupAction.class.getName() + ".uptime", new Date()); // Clear locks try { LockServiceUtil.clear();... |
if (pollsQuestion.isNew() || pollsQuestion.isModified()) { session = openSession(); if (pollsQuestion.isNew()) { PollsQuestion pollsQuestionModel = new PollsQuestion(); pollsQuestionModel.setQuestionId(pollsQuestion.getQuestionId()); pollsQuestionModel.setGroupId(pollsQuestion.getGroupId()); pollsQuestionModel.setComp... | session = openSession(); session.saveOrUpdate(pollsQuestion); session.flush(); pollsQuestion.setNew(false); | public com.liferay.portlet.polls.model.PollsQuestion update( com.liferay.portlet.polls.model.PollsQuestion pollsQuestion) throws SystemException { Session session = null; try { if (pollsQuestion.isNew() || pollsQuestion.isModified()) { session = openSession(); if (pollsQuestion.isNew()) { PollsQuestion... |
catch (NoSuchLayoutException ns) { _log.warn(ns); | catch (NoSuchLayoutException nsle) { _log.warn(nsle); | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { if (!PortalInstances.matches()) { return; } ServletContext ctx = getServletContext(); // Do not set the entire full main path. See LEP-456. //String mainPath = (String)ctx.getAttribute(WebKeys.MAIN_PATH)... |
return; | redirect = mainPath; | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { if (!PortalInstances.matches()) { return; } ServletContext ctx = getServletContext(); // Do not set the entire full main path. See LEP-456. //String mainPath = (String)ctx.getAttribute(WebKeys.MAIN_PATH)... |
themeDisplay.setShowAddContentIcon(true); themeDisplay.setShowPageSettingsIcon(true); themeDisplay.setURLAddContent( "LayoutConfiguration.toggle('" + PortletKeys.LAYOUT_CONFIGURATION + "', '" + plid + "', '" + mainPath + "','" + themeDisplay.getPathThemeImage() + "');"); | if (GroupPermission.contains( permissionChecker, portletGroupId, ActionKeys.MANAGE_LAYOUTS)) { themeDisplay.setShowAddContentIcon(true); themeDisplay.setShowPageSettingsIcon(true); themeDisplay.setURLAddContent( "LayoutConfiguration.toggle('" + PortletKeys.LAYOUT_CONFIGURATION + "', '" + plid + "', '" + mainPath + "'... | public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { HttpSession ses = req.getSession(); // Company Company company = PortalUtil.getCompany(req); String companyId = company.getCompanyId(); // Paths String contextPath = CompanyPropsUtil.get( companyId, PropsUt... |
PortletURL pageSettingsURL = new PortletURLImpl( req, PortletKeys.LAYOUT_MANAGEMENT, plid, false); pageSettingsURL.setWindowState(WindowState.MAXIMIZED); pageSettingsURL.setPortletMode(PortletMode.VIEW); pageSettingsURL.setParameter( "struts_action", "/layout_management/edit_pages"); if (layout.isPrivateLayout()) { ... | public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { HttpSession ses = req.getSession(); // Company Company company = PortalUtil.getCompany(req); String companyId = company.getCompanyId(); // Paths String contextPath = CompanyPropsUtil.get( companyId, PropsUt... | |
public Theme getTheme() { | public Theme getTheme() throws PortalException, SystemException { | public Theme getTheme() { if (isInheritLookAndFeel()) { return getLayoutSet().getTheme(); } else { return ThemeLocalUtil.getTheme(getCompanyId(), getThemeId()); } } |
public ColorScheme getColorScheme() { | public ColorScheme getColorScheme() throws PortalException, SystemException { | public ColorScheme getColorScheme() { if (isInheritLookAndFeel()) { return getLayoutSet().getColorScheme(); } else { return ThemeLocalUtil.getColorScheme( getCompanyId(), getTheme().getThemeId(), getColorSchemeId()); } } |
return mapping.findForward("portlet.alfresco_content.view"); | if (Validator.isNull(previewURL)) { return mapping.findForward("portlet.alfresco_content.view_1"); } else { return mapping.findForward("portlet.alfresco_content.view_2"); } | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { PortletPreferences prefs = req.getPreferences(); String baseURL = prefs.getValue("base-url", StringPool.BLANK); String indexURL = prefs.getValue("index-url", Stri... |
else if (type.equals("topic")) { String topicId = url.substring(y + 1, url.length()); queryString += "&_19_struts_action=%2Fmessage_boards%2Fview_topic" + "&_19_topicId=" + topicId; } | public String[] getValues(String url, int pos) { String friendlyURL = url.substring(0, pos); String queryString = "&p_p_id=19&p_p_action=0&p_p_state=maximized"; int x = url.indexOf("/", pos + 1); int y = url.indexOf("/", x + 1); if (y == -1) { queryString += "&_19_struts_action=%2Fmessage_boards%2Fview&_19_c... | |
String topicId = MBMessage.DEPRECATED_TOPIC_ID; | public String[] getValues(String url, int pos) { String friendlyURL = url.substring(0, pos); String queryString = "&p_p_id=19&p_p_action=0&p_p_state=maximized"; int x = url.indexOf("/", pos + 1); int y = url.indexOf("/", x + 1); if (y == -1) { queryString += "&_19_struts_action=%2Fmessage_boards%2Fview&_19_c... | |
"&_19_topicId=" + topicId + "&_19_messageId=" + messageId; | "&_19_messageId=" + messageId; | public String[] getValues(String url, int pos) { String friendlyURL = url.substring(0, pos); String queryString = "&p_p_id=19&p_p_action=0&p_p_state=maximized"; int x = url.indexOf("/", pos + 1); int y = url.indexOf("/", x + 1); if (y == -1) { queryString += "&_19_struts_action=%2Fmessage_boards%2Fview&_19_c... |
if (selResource.equals(Group.class.getName())) { if (!GroupPermission.contains( permissionChecker, resourcePrimKey, ActionKeys.PERMISSIONS)) { | try { if (selResource.equals(Group.class.getName())) { GroupPermission.check( permissionChecker, resourcePrimKey, ActionKeys.PERMISSIONS); } else if (selResource.equals(Layout.class.getName())) { String layoutGroupId = StringUtil.split(resourcePrimKey, ".")[1]; | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
SessionErrors.add(req, PrincipalException.class.getName()); | layoutGroupId = StringUtil.replace(layoutGroupId, "}", ""); | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
setForward(req, "portlet.portlet_configuration.error"); | GroupPermission.check( permissionChecker, layoutGroupId, ActionKeys.MANAGE_LAYOUTS); | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
} else if (selResource.equals(Layout.class.getName())) { String layoutGroupId = StringUtil.split(resourcePrimKey, ".")[1]; | else if (selResource.equals(User.class.getName())) { User user = UserLocalServiceUtil.getUserById(resourcePrimKey); | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
layoutGroupId = StringUtil.replace(layoutGroupId, "}", ""); if (!GroupPermission.contains( permissionChecker, layoutGroupId, ActionKeys.MANAGE_LAYOUTS)) { SessionErrors.add(req, PrincipalException.class.getName()); setForward(req, "portlet.portlet_configuration.error"); } } else if (selResource.equals(User.class.get... | UserPermission.check( | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
ActionKeys.PERMISSIONS)) { | ActionKeys.PERMISSIONS); } else if (resourcePrimKey.startsWith(ownerId)) { if (!permissionChecker.hasPermission( groupId, selResource, resourcePrimKey, ActionKeys.CONFIGURATION)) { | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
SessionErrors.add(req, PrincipalException.class.getName()); | throw new PrincipalException(); } } else if (!permissionChecker.hasPermission( groupId, selResource, resourcePrimKey, ActionKeys.PERMISSIONS)) { | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
setForward(req, "portlet.portlet_configuration.error"); | throw new PrincipalException(); | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
else if (!permissionChecker.hasPermission( groupId, selResource, resourcePrimKey, ActionKeys.PERMISSIONS)) { | catch (PrincipalException pe) { | public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ... |
if (!Layout.isPrivateLayout(layout.getOwnerId())) { Resource resource = ResourceLocalServiceUtil.getResource(resourceId); if (resource.getPrimKey().startsWith(layout.getOwnerId())) { LayoutCacheUtil.clearCache(layout.getCompanyId()); } } | protected void updateGroupPermissions(ActionRequest req) throws Exception { Layout layout = (Layout)req.getAttribute(WebKeys.LAYOUT); String resourceId = ParamUtil.getString(req, "resourceId"); String groupId = ParamUtil.getString(req, "groupId"); String[] actionIds = StringUtil.split( ParamUtil.getString(req, "... | |
public Organization getLocation() throws PortalException, SystemException { | public Organization getLocation() { | public Organization getLocation() throws PortalException, SystemException { try { List organizations = OrganizationLocalServiceUtil.getUserOrganizations(getUserId()); for (int i = 0; i < organizations.size(); i++) { Organization organization = (Organization)organizations.get(i); if (!organization.getPare... |
clearGroups.clear(roleId); clearPermissions.clear(roleId); clearUsers.clear(roleId); | public Role remove(String roleId) throws NoSuchRoleException, SystemException { Session session = null; try { session = openSession(); Role role = (Role)session.get(Role.class, roleId); if (role == null) { _log.warn("No Role exists with the primary key " + roleId.toString()); throw new NoSuchRoleExc... | |
HttpServletRequest req, String portletId, String selPlid) | HttpServletRequest req, String portletId) | public static PortletPreferencesPK getPortletPreferencesPK( HttpServletRequest req, String portletId, String selPlid) throws PortalException, SystemException { // Below is a list of the possible combinations, where we specify the // portlet id, the layout id, the owner id, and the function. // PORTAL, SHARED, l... |
Layout layout = (Layout)req.getAttribute(WebKeys.LAYOUT); | public static PortletPreferencesPK getPortletPreferencesPK( HttpServletRequest req, String portletId, String selPlid) throws PortalException, SystemException { // Below is a list of the possible combinations, where we specify the // portlet id, the layout id, the owner id, and the function. // PORTAL, SHARED, l... | |
ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); Layout layout = themeDisplay.getLayout(); LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet(); Portlet portlet = PortletLocalServiceUtil.getPortletById( themeDisplay.getCompanyId(), portletId); String layoutId = ... | return getPortletPreferencesPK(req, portletId, layout.getPlid()); | public static PortletPreferencesPK getPortletPreferencesPK( HttpServletRequest req, String portletId, String selPlid) throws PortalException, SystemException { // Below is a list of the possible combinations, where we specify the // portlet id, the layout id, the owner id, and the function. // PORTAL, SHARED, l... |
PermissionChecker permissionChecker, String topicId, String messageId, String actionId) | PermissionChecker permissionChecker, String messageId, String actionId) | public static void check( PermissionChecker permissionChecker, String topicId, String messageId, String actionId) throws PortalException, SystemException { if (!contains(permissionChecker, topicId, messageId, actionId)) { throw new PrincipalException(); } } |
if (!contains(permissionChecker, topicId, messageId, actionId)) { | if (!contains(permissionChecker, messageId, actionId)) { | public static void check( PermissionChecker permissionChecker, String topicId, String messageId, String actionId) throws PortalException, SystemException { if (!contains(permissionChecker, topicId, messageId, actionId)) { throw new PrincipalException(); } } |
PermissionChecker permissionChecker, String topicId, String messageId, String actionId) | PermissionChecker permissionChecker, String messageId, String actionId) | public static boolean contains( PermissionChecker permissionChecker, String topicId, String messageId, String actionId) throws PortalException, SystemException { MBMessage message = MBMessageLocalServiceUtil.getMessage( topicId, messageId); return contains(permissionChecker, message, actionId); } |
MBMessage message = MBMessageLocalServiceUtil.getMessage( topicId, messageId); | MBMessage message = MBMessageLocalServiceUtil.getMessage(messageId); | public static boolean contains( PermissionChecker permissionChecker, String topicId, String messageId, String actionId) throws PortalException, SystemException { MBMessage message = MBMessageLocalServiceUtil.getMessage( topicId, messageId); return contains(permissionChecker, message, actionId); } |
MessagingUtil.addRosterEntry(req.getSession(), companyId, email); jo.put("status", "success"); | jo = MessagingUtil.addRosterEntry(req.getSession(), companyId, email); | JSONObject addEntry(HttpServletRequest req) { JSONObject jo = new JSONObject(); try { String email = ParamUtil.getString(req, "email"); String companyId = PortalUtil.getCompanyId(req); MessagingUtil.addRosterEntry(req.getSession(), companyId, email); jo.put("status", "success"); } catch (Exception e) { j... |
if (Validator.isNotNull(organizationId) && Validator.isNotNull(locationId)) { | UserUtil.clearOrganizations(userId); | public User updateUser( String userId, String password, String emailAddress, String languageId, String timeZoneId, String greeting, String resolution, String comments, String firstName, String middleName, String lastName, String nickName, String prefixId, String suffixId, boolean male, int birthdayMonth, i... |
UserUtil.setOrganizations( userId, new String[] {organizationId, locationId}); | if (Validator.isNotNull(organizationId)) { UserUtil.addOrganization(userId, organizationId); } if (Validator.isNotNull(locationId)) { UserUtil.addOrganization(userId, locationId); | public User updateUser( String userId, String password, String emailAddress, String languageId, String timeZoneId, String greeting, String resolution, String comments, String firstName, String middleName, String lastName, String nickName, String prefixId, String suffixId, boolean male, int birthdayMonth, i... |
if (Validator.isNull(organizationId) && Validator.isNull(locationId) && !GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_REQUIRED))) { | boolean organizationRequired = GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_PARENT_ORGANIZATION_REQUIRED)); | protected void validateOrganizations( String companyId, String organizationId, String locationId) throws PortalException, SystemException { if (Validator.isNull(organizationId) && Validator.isNull(locationId) && !GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_REQUIRED))) { return; } Organiza... |
return; | boolean locationRequired = GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_LOCATION_REQUIRED)); if (locationRequired) { organizationRequired = true; | protected void validateOrganizations( String companyId, String organizationId, String locationId) throws PortalException, SystemException { if (Validator.isNull(organizationId) && Validator.isNull(locationId) && !GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_REQUIRED))) { return; } Organiza... |
Organization organization = OrganizationUtil.findByPrimaryKey(organizationId); | Organization organization = null; | protected void validateOrganizations( String companyId, String organizationId, String locationId) throws PortalException, SystemException { if (Validator.isNull(organizationId) && Validator.isNull(locationId) && !GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_REQUIRED))) { return; } Organiza... |
Organization location = OrganizationUtil.findByPrimaryKey(locationId); | if (organizationRequired || Validator.isNotNull(organizationId)) { organization = OrganizationUtil.findByPrimaryKey(organizationId); } | protected void validateOrganizations( String companyId, String organizationId, String locationId) throws PortalException, SystemException { if (Validator.isNull(organizationId) && Validator.isNull(locationId) && !GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_REQUIRED))) { return; } Organiza... |
if (!location.getParentOrganizationId().equals( organization.getOrganizationId())) { | Organization location = null; | protected void validateOrganizations( String companyId, String organizationId, String locationId) throws PortalException, SystemException { if (Validator.isNull(organizationId) && Validator.isNull(locationId) && !GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_REQUIRED))) { return; } Organiza... |
throw new OrganizationParentException(); | if (locationRequired || Validator.isNotNull(locationId)) { location = OrganizationUtil.findByPrimaryKey(locationId); } if ((organization != null) && (location != null)) { if (!location.getParentOrganizationId().equals( organization.getOrganizationId())) { throw new OrganizationParentException(); } | protected void validateOrganizations( String companyId, String organizationId, String locationId) throws PortalException, SystemException { if (Validator.isNull(organizationId) && Validator.isNull(locationId) && !GetterUtil.getBoolean(PropsUtil.get( PropsUtil.ORGANIZATIONS_REQUIRED))) { return; } Organiza... |
if (pollsChoice.isNew() || pollsChoice.isModified()) { session = openSession(); if (pollsChoice.isNew()) { PollsChoice pollsChoiceModel = new PollsChoice(); pollsChoiceModel.setQuestionId(pollsChoice.getQuestionId()); pollsChoiceModel.setChoiceId(pollsChoice.getChoiceId()); pollsChoiceModel.setDescription(pollsChoice.... | session = openSession(); session.saveOrUpdate(pollsChoice); session.flush(); pollsChoice.setNew(false); | public com.liferay.portlet.polls.model.PollsChoice update( com.liferay.portlet.polls.model.PollsChoice pollsChoice) throws SystemException { Session session = null; try { if (pollsChoice.isNew() || pollsChoice.isModified()) { session = openSession(); if (pollsChoice.isNew()) { PollsChoice pollsChoiceMo... |
User user = getUser(); | checkPermission(organizationId, ActionKeys.UPDATE); | public OrgLabor addOrgLabor( String organizationId, String typeId, int sunOpen, int sunClose, int monOpen, int monClose, int tueOpen, int tueClose, int wedOpen, int wedClose, int thuOpen, int thuClose, int friOpen, int friClose, int satOpen, int satClose) throws PortalException, SystemException { User user =... |
_validate(typeId); String orgLaborId = Long.toString(CounterServiceUtil.increment( OrgLabor.class.getName())); OrgLabor orgLabor = OrgLaborUtil.create(orgLaborId); Date now = new Date(); orgLabor.setOrganizationId(organizationId); orgLabor.setTypeId(typeId); orgLabor.setSunOpen(sunOpen); orgLabor.setSunClose(sunClo... | return OrgLaborLocalServiceUtil.addOrgLabor( organizationId, typeId, sunOpen, sunClose, monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen, thuClose, friOpen, friClose, satOpen, satClose); | public OrgLabor addOrgLabor( String organizationId, String typeId, int sunOpen, int sunClose, int monOpen, int monClose, int tueOpen, int tueClose, int wedOpen, int wedClose, int thuOpen, int thuClose, int friOpen, int friClose, int satOpen, int satClose) throws PortalException, SystemException { User user =... |
OrgLaborUtil.remove(orgLaborId); | OrgLabor orgLabor = OrgLaborUtil.findByPrimaryKey(orgLaborId); checkPermission(orgLabor.getOrganizationId(), ActionKeys.UPDATE); OrgLaborLocalServiceUtil.deleteOrgLabor(orgLaborId); | public void deleteOrgLabor(String orgLaborId) throws PortalException, SystemException { OrgLaborUtil.remove(orgLaborId); } |
return OrgLaborUtil.findByPrimaryKey(orgLaborId); | OrgLabor orgLabor = OrgLaborUtil.findByPrimaryKey(orgLaborId); checkPermission(orgLabor.getOrganizationId(), ActionKeys.VIEW); return orgLabor; | public OrgLabor getOrgLabor(String orgLaborId) throws PortalException, SystemException { return OrgLaborUtil.findByPrimaryKey(orgLaborId); } |
public List getOrgLabors(String organizationId) throws SystemException { return OrgLaborUtil.findByOrganizationId(organizationId); | public List getOrgLabors(String organizationId) throws PortalException, SystemException { checkPermission(organizationId, ActionKeys.VIEW); return OrgLaborLocalServiceUtil.getOrgLabors(organizationId); | public List getOrgLabors(String organizationId) throws SystemException { return OrgLaborUtil.findByOrganizationId(organizationId); } |
orgLabor.setSunOpen(sunOpen); orgLabor.setSunClose(sunClose); orgLabor.setMonOpen(monOpen); orgLabor.setMonClose(monClose); orgLabor.setTueOpen(tueOpen); orgLabor.setTueClose(tueClose); orgLabor.setWedOpen(wedOpen); orgLabor.setWedClose(wedClose); orgLabor.setThuOpen(thuOpen); orgLabor.setThuClose(thuClose); orgLabor.s... | checkPermission(orgLabor.getOrganizationId(), ActionKeys.UPDATE); | public OrgLabor updateOrgLabor( String orgLaborId, int sunOpen, int sunClose, int monOpen, int monClose, int tueOpen, int tueClose, int wedOpen, int wedClose, int thuOpen, int thuClose, int friOpen, int friClose, int satOpen, int satClose) throws PortalException, SystemException { OrgLabor orgLabor = OrgLabo... |
OrgLaborUtil.update(orgLabor); return orgLabor; | return OrgLaborLocalServiceUtil.updateOrgLabor( orgLaborId, sunOpen, sunClose, monOpen, monClose, tueOpen, tueClose, wedOpen, wedClose, thuOpen, thuClose, friOpen, friClose, satOpen, satClose); | public OrgLabor updateOrgLabor( String orgLaborId, int sunOpen, int sunClose, int monOpen, int monClose, int tueOpen, int tueClose, int wedOpen, int wedClose, int thuOpen, int thuClose, int friOpen, int friClose, int satOpen, int satClose) throws PortalException, SystemException { OrgLabor orgLabor = OrgLabo... |
!appServerType.equals("pramati") && | protected void checkArguments() { if (Validator.isNull(baseDir)) { throw new IllegalArgumentException( "The system property deployer.base.dir is not set"); } if (Validator.isNull(destDir)) { throw new IllegalArgumentException( "The system property deployer.dest.dir is not set"); } if (Validator.isNull(a... | |
Object[] arguments = { new Integer(style) }; | Object[] arguments = { Integer.valueOf( style ) }; | protected Object createWidget(Object parent) throws GroovyException { if (beanClass == null) { throw new GroovyException("No Class available to create the new widget"); } try { if (parent == null) { // lets try call a constructor with a single style ... |
Object[] arguments = { parent, new Integer(style) }; | Object[] arguments = { parent, Integer.valueOf( style ) }; | protected Object createWidget(Object parent) throws GroovyException { if (beanClass == null) { throw new GroovyException("No Class available to create the new widget"); } try { if (parent == null) { // lets try call a constructor with a single style ... |
throw new RuntimeException( e ); | protected void setBeanProperties(Object bean, Map properties) { if (bean instanceof Control) { Control control = (Control) bean; // set size of widget Object size = properties.remove("size"); if (size != null) { setSize(control, size); } ... | |
LogFactoryUtil.setLogFactory(new LogFactoryImpl()); | LogFactoryUtil.setLogFactory(new CommonsLogFactoryImpl()); | public void run(String[] ids) throws ActionException { // Set default locale String userLanguage = SystemProperties.get("user.language"); String userCountry = SystemProperties.get("user.country"); String userVariant = SystemProperties.get("user.variant"); if (Validator.isNull(userVariant)) { Locale.setDefault(n... |
_logFactory = logFactory; | _logFactory.setLogFactory(logFactory); | public static void setLogFactory(LogFactory logFactory) { _logFactory = logFactory; } |
if (shoppingCategory.isNew() || shoppingCategory.isModified()) { session = openSession(); if (shoppingCategory.isNew()) { ShoppingCategory shoppingCategoryModel = new ShoppingCategory(); shoppingCategoryModel.setCategoryId(shoppingCategory.getCategoryId()); shoppingCategoryModel.setGroupId(shoppingCategory.getGroupId(... | session = openSession(); session.saveOrUpdate(shoppingCategory); session.flush(); shoppingCategory.setNew(false); | public com.liferay.portlet.shopping.model.ShoppingCategory update( com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) throws SystemException { Session session = null; try { if (shoppingCategory.isNew() || shoppingCategory.isModified()) { session = openSession(); if (shoppingCategory.isNe... |
public com.liferay.portal.model.Group getGroup(java.lang.String companyId, java.lang.String name) | public com.liferay.portal.model.Group getGroup(java.lang.String groupId) | public com.liferay.portal.model.Group getGroup(java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException, java.rmi.RemoteException { PrincipalSessionBean.setThreadValues(_sc); return getService().getGroup(companyId, name); } |
return getService().getGroup(companyId, name); | return getService().getGroup(groupId); | public com.liferay.portal.model.Group getGroup(java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException, java.rmi.RemoteException { PrincipalSessionBean.setThreadValues(_sc); return getService().getGroup(companyId, name); } |
setModified(true); | public void setActionId(String actionId) { if (((actionId == null) && (_actionId != null)) || ((actionId != null) && (_actionId == null)) || ((actionId != null) && (_actionId != null) && !actionId.equals(_actionId))) { if (!XSS_ALLOW_ACTIONID) { actionId = XSSUtil.strip(actionId); } _actionId = acti... | |
setModified(true); | public void setPermissionId(String permissionId) { if (((permissionId == null) && (_permissionId != null)) || ((permissionId != null) && (_permissionId == null)) || ((permissionId != null) && (_permissionId != null) && !permissionId.equals(_permissionId))) { if (!XSS_ALLOW_PERMISSIONID) { permissionId =... | |
setModified(true); | public void setResourceId(String resourceId) { if (((resourceId == null) && (_resourceId != null)) || ((resourceId != null) && (_resourceId == null)) || ((resourceId != null) && (_resourceId != null) && !resourceId.equals(_resourceId))) { if (!XSS_ALLOW_RESOURCEID) { resourceId = XSSUtil.strip(resourceI... | |
throws com.liferay.portal.SystemException, java.rmi.RemoteException; | throws com.liferay.portal.PortalException, com.liferay.portal.SystemException, java.rmi.RemoteException; | public java.util.List getOrgLabors(java.lang.String organizationId) throws com.liferay.portal.SystemException, java.rmi.RemoteException; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.