rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
setModified(true); | public void setApproved(boolean approved) { if (approved != _approved) { _approved = approved; setModified(true); } } | |
setModified(true); | public void setApprovedByUserId(String approvedByUserId) { if (((approvedByUserId == null) && (_approvedByUserId != null)) || ((approvedByUserId != null) && (_approvedByUserId == null)) || ((approvedByUserId != null) && (_approvedByUserId != null) && !approvedByUserId.equals(_approvedByUserId))) { if (!XSS... | |
setModified(true); | public void setApprovedByUserName(String approvedByUserName) { if (((approvedByUserName == null) && (_approvedByUserName != null)) || ((approvedByUserName != null) && (_approvedByUserName == null)) || ((approvedByUserName != null) && (_approvedByUserName != null) && !approvedByUserName.equals(_approvedByUser... | |
setModified(true); | public void setApprovedDate(Date approvedDate) { if (((approvedDate == null) && (_approvedDate != null)) || ((approvedDate != null) && (_approvedDate == null)) || ((approvedDate != null) && (_approvedDate != null) && !approvedDate.equals(_approvedDate))) { _approvedDate = approvedDate; setModified(true);... | |
setModified(true); | public void setContent(String content) { if (((content == null) && (_content != null)) || ((content != null) && (_content == null)) || ((content != null) && (_content != null) && !content.equals(_content))) { if (!XSS_ALLOW_CONTENT) { content = XSSUtil.strip(content); } _content = content; setModi... | |
setModified(true); | public void setDisplayDate(Date displayDate) { if (((displayDate == null) && (_displayDate != null)) || ((displayDate != null) && (_displayDate == null)) || ((displayDate != null) && (_displayDate != null) && !displayDate.equals(_displayDate))) { _displayDate = displayDate; setModified(true); } } | |
setModified(true); | public void setExpirationDate(Date expirationDate) { if (((expirationDate == null) && (_expirationDate != null)) || ((expirationDate != null) && (_expirationDate == null)) || ((expirationDate != null) && (_expirationDate != null) && !expirationDate.equals(_expirationDate))) { _expirationDate = expirationDa... | |
setModified(true); | public void setExpired(boolean expired) { if (expired != _expired) { _expired = expired; setModified(true); } } | |
setModified(true); | public void setReviewDate(Date reviewDate) { if (((reviewDate == null) && (_reviewDate != null)) || ((reviewDate != null) && (_reviewDate == null)) || ((reviewDate != null) && (_reviewDate != null) && !reviewDate.equals(_reviewDate))) { _reviewDate = reviewDate; setModified(true); } } | |
setModified(true); | public void setStructureId(String structureId) { if (((structureId == null) && (_structureId != null)) || ((structureId != null) && (_structureId == null)) || ((structureId != null) && (_structureId != null) && !structureId.equals(_structureId))) { if (!XSS_ALLOW_STRUCTUREID) { structureId = XSSUtil.str... | |
setModified(true); | public void setTemplateId(String templateId) { if (((templateId == null) && (_templateId != null)) || ((templateId != null) && (_templateId == null)) || ((templateId != null) && (_templateId != null) && !templateId.equals(_templateId))) { if (!XSS_ALLOW_TEMPLATEID) { templateId = XSSUtil.strip(templateI... | |
setModified(true); | public void setTitle(String title) { if (((title == null) && (_title != null)) || ((title != null) && (_title == null)) || ((title != null) && (_title != null) && !title.equals(_title))) { if (!XSS_ALLOW_TITLE) { title = XSSUtil.strip(title); } _title = title; setModified(true); } } | |
setModified(true); | public void setVersion(double version) { if (version != _version) { _version = version; setModified(true); } } | |
CompanyPropsUtil.get(companyId, PropsUtil.DEFAULT_THEME_ID)); | PrefsPropsUtil.getString(companyId, PropsUtil.DEFAULT_THEME_ID)); | public LayoutSet addLayoutSet(String ownerId, String companyId) throws PortalException, SystemException { String groupId = Layout.getGroupId(ownerId); String userId = Layout.getGroupId(ownerId); boolean privateLayout = Layout.isPrivateLayout(ownerId); LayoutSet layoutSet = LayoutSetUtil.create(ownerId); layoutSe... |
CompanyPropsUtil.get(companyId, PropsUtil.DEFAULT_COLOR_SCHEME_ID)); | PrefsPropsUtil.getString( companyId, PropsUtil.DEFAULT_COLOR_SCHEME_ID)); | public LayoutSet addLayoutSet(String ownerId, String companyId) throws PortalException, SystemException { String groupId = Layout.getGroupId(ownerId); String userId = Layout.getGroupId(ownerId); boolean privateLayout = Layout.isPrivateLayout(ownerId); LayoutSet layoutSet = LayoutSetUtil.create(ownerId); layoutSe... |
setModified(true); | public void setPrivateLayout(boolean privateLayout) { if (privateLayout != _privateLayout) { _privateLayout = privateLayout; setModified(true); } } | |
setModified(true); | public void setThemeId(String themeId) { if (((themeId == null) && (_themeId != null)) || ((themeId != null) && (_themeId == null)) || ((themeId != null) && (_themeId != null) && !themeId.equals(_themeId))) { if (!XSS_ALLOW_THEMEID) { themeId = XSSUtil.strip(themeId); } _themeId = themeId; setModi... | |
setModified(true); | public void setColorSchemeId(String colorSchemeId) { if (((colorSchemeId == null) && (_colorSchemeId != null)) || ((colorSchemeId != null) && (_colorSchemeId == null)) || ((colorSchemeId != null) && (_colorSchemeId != null) && !colorSchemeId.equals(_colorSchemeId))) { if (!XSS_ALLOW_COLORSCHEMEID) { col... | |
setModified(true); | public void setPageCount(int pageCount) { if (pageCount != _pageCount) { _pageCount = pageCount; setModified(true); } } | |
jMsg.put("fromId", message.getProperty("fromId")); | jMsg.put("fromId", fromId); | protected JSONObject getChatMessages(HttpServletRequest req) { JSONArray ja = new JSONArray(); JSONObject jo = new JSONObject(); PacketCollector collector = MessagingUtil .getCollector(req.getSession()); Message message = MessagingUtil.getNextMessage(collector); while (message != null) { JSONObject jMsg = new... |
jMsg.put("status", MessagingUtil.getPresence( roster.getPresence( MessagingUtil.getXmppId(fromId)))); | protected JSONObject getChatMessages(HttpServletRequest req) { JSONArray ja = new JSONArray(); JSONObject jo = new JSONObject(); PacketCollector collector = MessagingUtil .getCollector(req.getSession()); Message message = MessagingUtil.getNextMessage(collector); while (message != null) { JSONObject jMsg = new... | |
_validate( | validate( | public Address addAddress( String userId, String className, String classPK, String street1, String street2, String street3, String city, String zip, String regionId, String countryId, String typeId, boolean mailing, boolean primary) throws PortalException, SystemException { User user = UserUtil.findByPrimary... |
Date now = new Date(); | public Address addAddress( String userId, String className, String classPK, String street1, String street2, String street3, String city, String zip, String regionId, String countryId, String typeId, boolean mailing, boolean primary) throws PortalException, SystemException { User user = UserUtil.findByPrimary... | |
_validate( | validate( | public Address updateAddress( String addressId, String street1, String street2, String street3, String city, String zip, String regionId, String countryId, String typeId, boolean mailing, boolean primary) throws PortalException, SystemException { _validate( addressId, null, null, null, street1, city, zip, re... |
if (className.equals(Organization.class.getName())) { | if (className.equals(Account.class.getName())) { Account account = AccountLocalServiceUtil.getAccount(classPK); if (account.isDefaultAccount()) { AccountPermission.check(permissionChecker, classPK, actionId); } else { throw new PrincipalException(); } } else if (className.equals(Contact.class.getName())) { User user =... | public static void checkPermission( PermissionChecker permissionChecker, String className, String classPK, String actionId) throws PortalException, SystemException { if (className.equals(Organization.class.getName())) { Organization organization = OrganizationLocalServiceUtil.getOrganization(classPK); if ... |
else if (className.equals(Contact.class.getName())) { User user = UserLocalServiceUtil.getUserById(classPK); UserPermission.check( permissionChecker, classPK, user.getOrganization().getOrganizationId(), user.getLocation().getOrganizationId(), actionId); } | public static void checkPermission( PermissionChecker permissionChecker, String className, String classPK, String actionId) throws PortalException, SystemException { if (className.equals(Organization.class.getName())) { Organization organization = OrganizationLocalServiceUtil.getOrganization(classPK); if ... | |
comparison = me0.getRecipient().trim().compareTo(me1.getRecipient().trim()); | comparison = GetterUtil.getString(me0.getRecipient()).trim(). compareTo(GetterUtil.getString(me1.getRecipient()).trim()); | public int compare(Object arg0, Object arg1) { MailEnvelope me0 = (MailEnvelope)arg0; MailEnvelope me1 = (MailEnvelope)arg1; Long uid0 = new Long(me0.getMsgUID()); Long uid1 = new Long(me1.getMsgUID()); int comparison = 0; if (_asc) { comparison = me0.getRecipient().trim().compareTo(me1.getRecipient().trim... |
comparison = me1.getRecipient().trim().compareTo(me0.getRecipient().trim()); | comparison = GetterUtil.getString(me1.getRecipient()).trim(). compareTo(GetterUtil.getString(me0.getRecipient()).trim()); | public int compare(Object arg0, Object arg1) { MailEnvelope me0 = (MailEnvelope)arg0; MailEnvelope me1 = (MailEnvelope)arg1; Long uid0 = new Long(me0.getMsgUID()); Long uid1 = new Long(me1.getMsgUID()); int comparison = 0; if (_asc) { comparison = me0.getRecipient().trim().compareTo(me1.getRecipient().trim... |
jMe.put("id", me.getUID()); | jMe.put("id", me.getMsgNum()); | private String _getPreviewHeaders(HttpServletRequest req) { JSONObject jsonObj = new JSONObject(); try { String userId = PortalUtil.getUserId(req); String password = PortalUtil.getUserPassword(req); String folderId = ParamUtil.getString(req, "folderId"); MailUtil.setCurrentFolder(userId, password, fold... |
setModified(true); | public void setXsd(String xsd) { if (((xsd == null) && (_xsd != null)) || ((xsd != null) && (_xsd == null)) || ((xsd != null) && (_xsd != null) && !xsd.equals(_xsd))) { if (!XSS_ALLOW_XSD) { xsd = XSSUtil.strip(xsd); } _xsd = xsd; setModified(true); } } | |
String remoteUser = req.getRemoteUser(); | PermissionChecker permissionChecker = null; | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { String remoteUser = req.getRemoteUser(); if (_log.isDebugEnabled()) { _log.debug("Remote user " + remoteUser); } if (remoteUser != null) { PrincipalThreadLocal.setName(remoteUser); } super.service(req... |
if (_log.isDebugEnabled()) { _log.debug("Remote user " + remoteUser); | try { String remoteUser = req.getRemoteUser(); if (_log.isDebugEnabled()) { _log.debug("Remote user " + remoteUser); } if (remoteUser != null) { PrincipalThreadLocal.setName(remoteUser); User user = UserLocalServiceUtil.getUserById(remoteUser); permissionChecker = PermissionCheckerFactory.create(user, true); Permi... | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { String remoteUser = req.getRemoteUser(); if (_log.isDebugEnabled()) { _log.debug("Remote user " + remoteUser); } if (remoteUser != null) { PrincipalThreadLocal.setName(remoteUser); } super.service(req... |
if (remoteUser != null) { PrincipalThreadLocal.setName(remoteUser); | catch (Exception e) { _log.error(StackTraceUtil.getStackTrace(e)); | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { String remoteUser = req.getRemoteUser(); if (_log.isDebugEnabled()) { _log.debug("Remote user " + remoteUser); } if (remoteUser != null) { PrincipalThreadLocal.setName(remoteUser); } super.service(req... |
super.service(req, res); | finally { try { PermissionCheckerFactory.recycle(permissionChecker); } catch (Exception e) { } } | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { String remoteUser = req.getRemoteUser(); if (_log.isDebugEnabled()) { _log.debug("Remote user " + remoteUser); } if (remoteUser != null) { PrincipalThreadLocal.setName(remoteUser); } super.service(req... |
if (userTrackerPath.isNew() || userTrackerPath.isModified()) { session = openSession(); if (userTrackerPath.isNew()) { UserTrackerPath userTrackerPathModel = new UserTrackerPath(); userTrackerPathModel.setUserTrackerPathId(userTrackerPath.getUserTrackerPathId()); userTrackerPathModel.setUserTrackerId(userTrackerPath.g... | session = openSession(); session.saveOrUpdate(userTrackerPath); session.flush(); userTrackerPath.setNew(false); | public com.liferay.portal.model.UserTrackerPath update( com.liferay.portal.model.UserTrackerPath userTrackerPath) throws SystemException { Session session = null; try { if (userTrackerPath.isNew() || userTrackerPath.isModified()) { session = openSession(); if (userTrackerPath.isNew()) { UserTrackerPath... |
sendRedirect(req, res); | if (Validator.isNotNull(cmd)) { sendRedirect(req, res); } | 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)) { updateArticle(req); } else if (... |
java.lang.String articleId, double version, boolean incrementVersion, java.lang.String title, java.lang.String content, java.lang.String type, java.lang.String structureId, java.lang.String templateId, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirat... | java.lang.String companyId, java.lang.String articleId, double version, boolean incrementVersion, java.lang.String title, java.lang.String content, java.lang.String type, java.lang.String structureId, java.lang.String templateId, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int di... | public static com.liferay.portlet.journal.model.JournalArticle updateArticle( java.lang.String articleId, double version, boolean incrementVersion, java.lang.String title, java.lang.String content, java.lang.String type, java.lang.String structureId, java.lang.String templateId, int displayDateMonth, int displayDa... |
return journalArticleService.updateArticle(articleId, version, incrementVersion, title, content, type, structureId, | return journalArticleService.updateArticle(companyId, articleId, version, incrementVersion, title, content, type, structureId, | public static com.liferay.portlet.journal.model.JournalArticle updateArticle( java.lang.String articleId, double version, boolean incrementVersion, java.lang.String title, java.lang.String content, java.lang.String type, java.lang.String structureId, java.lang.String templateId, int displayDateMonth, int displayDa... |
String dirName, Node dirNode) | Node dirNode) | private void _deleteDirectory( String companyId, String portletId, String repositoryId, String dirName, Node dirNode) throws IOException { try { NodeIterator itr = dirNode.getNodes(); while (itr.hasNext()) { Node node = (Node)itr.next(); String primaryNodeTypeName = node.getPrimaryNodeType().getNam... |
_deleteDirectory(companyId, portletId, repositoryId, node); | private void _deleteDirectory( String companyId, String portletId, String repositoryId, String dirName, Node dirNode) throws IOException { try { NodeIterator itr = dirNode.getNodes(); while (itr.hasNext()) { Node node = (Node)itr.next(); String primaryNodeTypeName = node.getPrimaryNodeType().getNam... | |
Indexer.deleteFile( companyId, portletId, repositoryId, dirNode.getName()); | private void _deleteDirectory( String companyId, String portletId, String repositoryId, String dirName, Node dirNode) throws IOException { try { NodeIterator itr = dirNode.getNodes(); while (itr.hasNext()) { Node node = (Node)itr.next(); String primaryNodeTypeName = node.getPrimaryNodeType().getNam... | |
_deleteDirectory(companyId, portletId, repositoryId, dirName, repositoryNode); | _deleteDirectory(companyId, portletId, repositoryId, dirNode); | public void deleteDirectory( String companyId, String portletId, String repositoryId, String dirName) throws PortalException, SystemException { Session session = null; try { session = JCRFactoryUtil.createSession(); Node rootNode = DLUtil.getRootNode(session, companyId); Node repositoryNode = DLUtil.getFo... |
Indexer.deleteFile(companyId, portletId, repositoryId, dirName); | dirNode.remove(); | public void deleteDirectory( String companyId, String portletId, String repositoryId, String dirName) throws PortalException, SystemException { Session session = null; try { session = JCRFactoryUtil.createSession(); Node rootNode = DLUtil.getRootNode(session, companyId); Node repositoryNode = DLUtil.getFo... |
nodeIdsQuery.add(new TermQuery(new Term( "nodeId", nodeIds[i])), false, false); | Term term = new Term("nodeId", nodeIds[i]); TermQuery termQuery = new TermQuery(term); nodeIdsQuery.add(termQuery, BooleanClause.Occur.SHOULD); | public Hits search( String companyId, String groupId, String[] nodeIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.POR... |
booleanQuery.add(nodeIdsQuery, true, false); | booleanQuery.add(nodeIdsQuery, BooleanClause.Occur.MUST); | public Hits search( String companyId, String groupId, String[] nodeIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.POR... |
Query query = QueryParser.parse( booleanQuery.toString(), LuceneFields.CONTENT, LuceneUtil.getAnalyzer()); hits.recordHits(searcher.search(query)); | hits.recordHits(searcher.search(booleanQuery)); | public Hits search( String companyId, String groupId, String[] nodeIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.POR... |
sendRedirect(req, res); | if (Validator.isNotNull(cmd)) { sendRedirect(req, res); } | 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)) { updateMessage(req, res); } else... |
public static void deleteMessage(java.lang.String topicId, java.lang.String messageId) | public static void deleteMessage(java.lang.String messageId) | public static void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageService mbMessageService = MBMessageServiceFactory.getService(); mbMessageService.deleteMessage(topicId, messageId); } catch ... |
mbMessageService.deleteMessage(topicId, messageId); | mbMessageService.deleteMessage(messageId); | public static void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageService mbMessageService = MBMessageServiceFactory.getService(); mbMessageService.deleteMessage(topicId, messageId); } catch ... |
public static void subscribeMessage(java.lang.String topicId, java.lang.String messageId) | public static void subscribeMessage(java.lang.String messageId) | public static void subscribeMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageService mbMessageService = MBMessageServiceFactory.getService(); mbMessageService.subscribeMessage(topicId, messageId); } ... |
mbMessageService.subscribeMessage(topicId, messageId); | mbMessageService.subscribeMessage(messageId); | public static void subscribeMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageService mbMessageService = MBMessageServiceFactory.getService(); mbMessageService.subscribeMessage(topicId, messageId); } ... |
public static void unsubscribeMessage(java.lang.String topicId, java.lang.String messageId) | public static void unsubscribeMessage(java.lang.String messageId) | public static void unsubscribeMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageService mbMessageService = MBMessageServiceFactory.getService(); mbMessageService.unsubscribeMessage(topicId, messageId); ... |
mbMessageService.unsubscribeMessage(topicId, messageId); | mbMessageService.unsubscribeMessage(messageId); | public static void unsubscribeMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageService mbMessageService = MBMessageServiceFactory.getService(); mbMessageService.unsubscribeMessage(topicId, messageId); ... |
javax.portlet.PortletPreferences prefs, | public static com.liferay.portlet.messageboards.model.MBMessage addMessage( java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files, boolean anonymous, javax.portlet.PortletPreferences prefs, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.lifera... | |
files, anonymous, prefs, addCommunityPermissions, addGuestPermissions); | files, anonymous, addCommunityPermissions, addGuestPermissions); | public static com.liferay.portlet.messageboards.model.MBMessage addMessage( java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files, boolean anonymous, javax.portlet.PortletPreferences prefs, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.lifera... |
java.lang.String topicId, java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) | java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) | public static com.liferay.portlet.messageboards.model.MBMessage updateMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException {... |
return mbMessageService.updateMessage(topicId, messageId, categoryId, subject, body, files); | return mbMessageService.updateMessage(messageId, categoryId, subject, body, files); | public static com.liferay.portlet.messageboards.model.MBMessage updateMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException {... |
Properties propertiesObj = PropertiesLocalServiceUtil.getPortalProperties(companyId); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_AUTH_TYPE, authType); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_AUTO_LOGIN, Boolean.toString(autoLogin)); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_STRANGE... | CompanyLocalServiceUtil.updateSecurity( companyId, authType, autoLogin, strangers); | private void _upgradeCompany() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_COMPANY); rs = ps.executeQuery(); while (rs.next()) { String companyId = rs.getString... |
_log.debug("Shutting down JCR"); | public void run() { // Disconnect AIM try { AIMConnector.disconnect(); } catch (Exception e) { } // Disconnect ICQ try { ICQConnector.disconnect(); } catch (Exception e) { } // Disconnect MSN try { MSNConnector.disconnect(); } catch (Exception e) { } // Disconnect YM try { YMConnector.disconne... | |
setModified(true); | public void setAnonymous(boolean anonymous) { if (anonymous != _anonymous) { _anonymous = anonymous; setModified(true); } } | |
setModified(true); | public void setAttachments(boolean attachments) { if (attachments != _attachments) { _attachments = attachments; setModified(true); } } | |
setModified(true); | public void setBody(String body) { if (((body == null) && (_body != null)) || ((body != null) && (_body == null)) || ((body != null) && (_body != null) && !body.equals(_body))) { if (!XSS_ALLOW_BODY) { body = XSSUtil.strip(body); } _body = body; setModified(true); } } | |
setModified(true); | public void setParentMessageId(String parentMessageId) { if (((parentMessageId == null) && (_parentMessageId != null)) || ((parentMessageId != null) && (_parentMessageId == null)) || ((parentMessageId != null) && (_parentMessageId != null) && !parentMessageId.equals(_parentMessageId))) { if (!XSS_ALLOW_PAR... | |
setModified(true); | public void setSubject(String subject) { if (((subject == null) && (_subject != null)) || ((subject != null) && (_subject == null)) || ((subject != null) && (_subject != null) && !subject.equals(_subject))) { if (!XSS_ALLOW_SUBJECT) { subject = XSSUtil.strip(subject); } _subject = subject; setModi... | |
public void include( RenderRequest req, RenderResponse res, boolean strutsURLEncoder) | public void include(RenderRequest req, RenderResponse res) | public void include( RenderRequest req, RenderResponse res, boolean strutsURLEncoder) throws IOException, PortletException { try { RenderRequestImpl reqImpl = (RenderRequestImpl)req; RenderResponseImpl resImpl = (RenderResponseImpl)res; HttpServletRequest httpReq = reqImpl.getHttpServletRequest(); String p... |
try { RenderRequestImpl reqImpl = (RenderRequestImpl)req; RenderResponseImpl resImpl = (RenderResponseImpl)res; HttpServletRequest httpReq = reqImpl.getHttpServletRequest(); String pathInfo = null; String queryString = null; String requestURI = null; String servletPath = null; if (_path != null) { String pathNoQue... | include(req, res, false); | public void include( RenderRequest req, RenderResponse res, boolean strutsURLEncoder) throws IOException, PortletException { try { RenderRequestImpl reqImpl = (RenderRequestImpl)req; RenderResponseImpl resImpl = (RenderResponseImpl)res; HttpServletRequest httpReq = reqImpl.getHttpServletRequest(); String p... |
path.startsWith(_servletMapping) || | public String encodeURL(String path) { if (_log.isDebugEnabled()) { _log.debug("Path " + path); _log.debug("Context path " + _contextPath); _log.debug("Servlet mapping " + _servletMapping); } String encodedURL = path; if (path.startsWith("//") || path.startsWith(_contextPath + _servletMapping)) { // Stru... | |
public java.util.List getPermissions(java.lang.String[] actionIds, java.lang.String resourceId) | public java.util.List getPermissions(java.lang.String companyId, java.lang.String[] actionIds, java.lang.String resourceId) | public java.util.List getPermissions(java.lang.String[] actionIds, java.lang.String resourceId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
String categoryId, String topicId, String messageId, PageContext pageContext, RenderResponse res) | String categoryId, String messageId, PageContext pageContext, RenderResponse res) | public static String getBreadcrumbs( String categoryId, String topicId, String messageId, PageContext pageContext, RenderResponse res) throws Exception { if (Validator.isNotNull(topicId) && Validator.isNotNull(messageId)) { MBMessage message = MBMessageLocalServiceUtil.getMessage( topicId, messageId); ret... |
if (Validator.isNotNull(topicId) && Validator.isNotNull(messageId)) { MBMessage message = MBMessageLocalServiceUtil.getMessage( topicId, messageId); | if (Validator.isNotNull(messageId)) { MBMessage message = MBMessageLocalServiceUtil.getMessage(messageId); | public static String getBreadcrumbs( String categoryId, String topicId, String messageId, PageContext pageContext, RenderResponse res) throws Exception { if (Validator.isNotNull(topicId) && Validator.isNotNull(messageId)) { MBMessage message = MBMessageLocalServiceUtil.getMessage( topicId, messageId); ret... |
if (!folderName.equals(MAIL_INBOX_NAME) && !folderName.startsWith(MAIL_BOX_STYLE)) { folderName = MAIL_BOX_STYLE + folderName; } | folderName = _getResolvedFolderName(folderName); | public static void createFolder(HttpSession ses, String folderName) throws FolderException, StoreException { Folder folder = null; try { Iterator itr = getFolders(ses).iterator(); while (itr.hasNext()) { MailFolder mailFolder = (MailFolder)itr.next(); if (mailFolder.getName().equals(folderName)) { thr... |
if (!folderName.equals(MAIL_INBOX_NAME) && !folderName.startsWith(MAIL_BOX_STYLE)) { folderName = MAIL_BOX_STYLE + folderName; } | folderName = _getResolvedFolderName(folderName); | public static void removeFolder(HttpSession ses, String folderName) throws FolderException, StoreException { try { if (!folderName.equals(MAIL_INBOX_NAME) && !folderName.startsWith(MAIL_BOX_STYLE)) { folderName = MAIL_BOX_STYLE + folderName; } for (int i = 0; i < DEFAULT_FOLDERS.length; i++) { if (DEF... |
if (!oldFolderName.equals(MAIL_INBOX_NAME) && !oldFolderName.startsWith(MAIL_BOX_STYLE)) { oldFolderName = MAIL_BOX_STYLE + oldFolderName; } if (!newFolderName.equals(MAIL_INBOX_NAME) && !newFolderName.startsWith(MAIL_BOX_STYLE)) { newFolderName = MAIL_BOX_STYLE + newFolderName; } | oldFolderName = _getResolvedFolderName(oldFolderName); newFolderName = _getResolvedFolderName(newFolderName); | public static void renameFolder( HttpSession ses, String oldFolderName, String newFolderName) throws FolderException, StoreException { try { if (!oldFolderName.equals(MAIL_INBOX_NAME) && !oldFolderName.startsWith(MAIL_BOX_STYLE)) { oldFolderName = MAIL_BOX_STYLE + oldFolderName; } if (!newFolderName.eq... |
if (curFolder.getName().equals(oldFolderName)) { | String folderName = _getResolvedFolderName(curFolder.getName()); if (folderName.equals(oldFolderName)) { | public static void renameFolder( HttpSession ses, String oldFolderName, String newFolderName) throws FolderException, StoreException { try { if (!oldFolderName.equals(MAIL_INBOX_NAME) && !oldFolderName.startsWith(MAIL_BOX_STYLE)) { oldFolderName = MAIL_BOX_STYLE + oldFolderName; } if (!newFolderName.eq... |
if( method.getName().compareTo( descriptor.method.getName() ) != 0 ) | if( !method.getName().equals( descriptor.method.getName() ) ) | public int compareTo( final MethodDescriptor descriptor ) { if( method.getName().compareTo( descriptor.method.getName() ) != 0 ) return method.getName().compareTo( descriptor.method.getName() ); return method.toGenericString().compareTo( descriptor.method.toGenericStr... |
for( final String var : dom.keySet() ) | for( final Entry< String, Class > entry : dom.entrySet() ) | public Object[] getChildren( final Object parentElement ) { if( parentElement instanceof DOMDescriptor ) { final DOMDescriptor descriptor = ( DOMDescriptor )parentElement; final Map< String, Class > dom = getDOMInfo( descriptor.pluginName ); final List< VarDescripto... |
if( dom.get( var ) == null ) | if( entry.getValue() == null ) | public Object[] getChildren( final Object parentElement ) { if( parentElement instanceof DOMDescriptor ) { final DOMDescriptor descriptor = ( DOMDescriptor )parentElement; final Map< String, Class > dom = getDOMInfo( descriptor.pluginName ); final List< VarDescripto... |
list.add( new VarDescriptor( descriptor, var, dom.get( var ) ) ); | list.add( new VarDescriptor( descriptor, entry.getKey(), entry.getValue() ) ); | public Object[] getChildren( final Object parentElement ) { if( parentElement instanceof DOMDescriptor ) { final DOMDescriptor descriptor = ( DOMDescriptor )parentElement; final Map< String, Class > dom = getDOMInfo( descriptor.pluginName ); final List< VarDescripto... |
else if (resourcePrimKey.startsWith(ownerId)) { | else if (resourcePrimKey.startsWith( themeDisplay.getPlid() + Portlet.LAYOUT_SEPARATOR)) { | 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 (resource.getPrimKey().startsWith(layout.getOwnerId())) { | if (resource.getPrimKey().startsWith( layout.getPlid() + Portlet.LAYOUT_SEPARATOR)) { | 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, "... |
private static final long serialVersionUID = 1631027078150099602L; | public static < E extends Object > List< String > caseless( final E... objects ) { final Transformer< String > transformer = new Transformer< String >() { public String transform( final Object input ) { return ObjectUtils.toString( input ).toLowerCase(); ... | |
PortletPreferences prefs = AdminUtil.getPreferences(companyId); | PortletPreferences prefs = PrefsPropsUtil.getPreferences(companyId); | public void processAction( ActionMapping mapping, ActionForm form, PortletConfig config, ActionRequest req, ActionResponse res) throws Exception { String companyId = PortalUtil.getCompanyId(req); if (!RoleLocalServiceUtil.hasUserRole( req.getRemoteUser(), companyId, Role.ADMINISTRATOR)) { SessionErrors.add... |
prefs.store(); | if (!cmd.equals("updateLdap") && !cmd.equals("updateSecurity")) { prefs.store(); } | public void processAction( ActionMapping mapping, ActionForm form, PortletConfig config, ActionRequest req, ActionResponse res) throws Exception { String companyId = PortalUtil.getCompanyId(req); if (!RoleLocalServiceUtil.hasUserRole( req.getRemoteUser(), companyId, Role.ADMINISTRATOR)) { SessionErrors.add... |
prefs.setValue("defaultGroupNames", defaultGroupNames); prefs.setValue("defaultRoleNames", defaultRoleNames); | prefs.setValue(PropsUtil.ADMIN_DEFAULT_GROUP_NAMES, defaultGroupNames); prefs.setValue(PropsUtil.ADMIN_DEFAULT_ROLE_NAMES, defaultRoleNames); | protected void updateDefaultGroupsAndRoles( ActionRequest req, PortletPreferences prefs) throws Exception { String defaultGroupNames = ParamUtil.getString( req, "defaultGroupNames"); String defaultRoleNames = ParamUtil.getString(req, "defaultRoleNames"); prefs.setValue("defaultGroupNames", defaultGroupNames); ... |
"email-user-added-enabled", emailUserAddedEnabled); | PropsUtil.ADMIN_EMAIL_USER_ADDED_ENABLED, emailUserAddedEnabled); | protected void updateEmails( ActionRequest req, PortletPreferences prefs) throws Exception { String tabs3 = ParamUtil.getString(req, "tabs3"); if (tabs3.equals("user-added-email")) { String emailUserAddedEnabled = ParamUtil.getString( req, "emailUserAddedEnabled"); String emailUserAddedSubject = ParamUtil.... |
"email-user-added-subject", emailUserAddedSubject); prefs.setValue("email-user-added-body", emailUserAddedBody); | PropsUtil.ADMIN_EMAIL_USER_ADDED_SUBJECT, emailUserAddedSubject); prefs.setValue( PropsUtil.ADMIN_EMAIL_USER_ADDED_BODY, emailUserAddedBody); | protected void updateEmails( ActionRequest req, PortletPreferences prefs) throws Exception { String tabs3 = ParamUtil.getString(req, "tabs3"); if (tabs3.equals("user-added-email")) { String emailUserAddedEnabled = ParamUtil.getString( req, "emailUserAddedEnabled"); String emailUserAddedSubject = ParamUtil.... |
"email-password-sent-enabled", emailPasswordSentEnabled); | PropsUtil.ADMIN_EMAIL_PASSWORD_SENT_ENABLED, emailPasswordSentEnabled); | protected void updateEmails( ActionRequest req, PortletPreferences prefs) throws Exception { String tabs3 = ParamUtil.getString(req, "tabs3"); if (tabs3.equals("user-added-email")) { String emailUserAddedEnabled = ParamUtil.getString( req, "emailUserAddedEnabled"); String emailUserAddedSubject = ParamUtil.... |
"email-password-sent-subject", emailPasswordSentSubject); | PropsUtil.ADMIN_EMAIL_PASSWORD_SENT_SUBJECT, emailPasswordSentSubject); | protected void updateEmails( ActionRequest req, PortletPreferences prefs) throws Exception { String tabs3 = ParamUtil.getString(req, "tabs3"); if (tabs3.equals("user-added-email")) { String emailUserAddedEnabled = ParamUtil.getString( req, "emailUserAddedEnabled"); String emailUserAddedSubject = ParamUtil.... |
"email-password-sent-body", emailPasswordSentBody); | PropsUtil.ADMIN_EMAIL_PASSWORD_SENT_BODY, emailPasswordSentBody); | protected void updateEmails( ActionRequest req, PortletPreferences prefs) throws Exception { String tabs3 = ParamUtil.getString(req, "tabs3"); if (tabs3.equals("user-added-email")) { String emailUserAddedEnabled = ParamUtil.getString( req, "emailUserAddedEnabled"); String emailUserAddedSubject = ParamUtil.... |
prefs.setValue("email-from-name", emailFromName); prefs.setValue("email-from-address", emailFromAddress); | prefs.setValue(PropsUtil.ADMIN_EMAIL_FROM_NAME, emailFromName); prefs.setValue( PropsUtil.ADMIN_EMAIL_FROM_ADDRESS, emailFromAddress); | protected void updateEmails( ActionRequest req, PortletPreferences prefs) throws Exception { String tabs3 = ParamUtil.getString(req, "tabs3"); if (tabs3.equals("user-added-email")) { String emailUserAddedEnabled = ParamUtil.getString( req, "emailUserAddedEnabled"); String emailUserAddedSubject = ParamUtil.... |
prefs.setValue("mailHostNames", mailHostNames); | prefs.setValue(PropsUtil.ADMIN_MAIL_HOST_NAMES, mailHostNames); | protected void updateMailHostNames( ActionRequest req, PortletPreferences prefs) throws Exception { String mailHostNames = ParamUtil.getString(req, "mailHostNames"); prefs.setValue("mailHostNames", mailHostNames); } |
prefs.setValue("reservedUserIds", reservedUserIds); prefs.setValue("reservedEmailAddresses", reservedEmailAddresses); | prefs.setValue(PropsUtil.ADMIN_RESERVED_USER_IDS, reservedUserIds); prefs.setValue( PropsUtil.ADMIN_RESERVED_EMAIL_ADDRESSES, reservedEmailAddresses); | protected void updateReservedUsers( ActionRequest req, PortletPreferences prefs) throws Exception { String reservedUserIds = ParamUtil.getString(req, "reservedUserIds"); String reservedEmailAddresses = ParamUtil.getString( req, "reservedEmailAddresses"); prefs.setValue("reservedUserIds", reservedUserIds); pre... |
public Role addRole(String name) throws PortalException, SystemException { | public Role addRole(String name) throws PortalException, SystemException { PortalPermission.check(getPermissionChecker(), ActionKeys.ADD_ROLE); | public Role addRole(String name) throws PortalException, SystemException { String companyId = getUser().getCompanyId(); return RoleLocalServiceUtil.addRole(companyId, name); } |
String companyId = getUser().getCompanyId(); return RoleLocalServiceUtil.addRole(companyId, name); | return RoleLocalServiceUtil.addRole(getUser().getCompanyId(), name); | public Role addRole(String name) throws PortalException, SystemException { String companyId = getUser().getCompanyId(); return RoleLocalServiceUtil.addRole(companyId, name); } |
ses.removeAttribute(WebKeys.MAIL_MESSAGE); | private static IMAPFolder _getFolder(HttpSession ses, String folderName) throws Exception { if (Validator.isNull(folderName)) { folderName = MAIL_INBOX_NAME; } else if (!folderName.equals(MAIL_INBOX_NAME) && !folderName.startsWith(MAIL_BOX_STYLE)) { folderName = MAIL_BOX_STYLE + folderName; } IMAPFolder fo... | |
if (ses.getAttribute(WebKeys.MAIL_MESSAGE) != null) { ses.removeAttribute(WebKeys.MAIL_MESSAGE); } | ses.removeAttribute(WebKeys.MAIL_MESSAGE); | public static void cleanup(HttpSession ses) throws Exception { _closeFolder(ses); Store store = (Store)ses.getAttribute(WebKeys.MAIL_STORE); if (store != null) { store.close(); ses.removeAttribute(WebKeys.MAIL_STORE); } if (ses.getAttribute(WebKeys.MAIL_MESSAGE) != null) { ses.removeAttribute(WebKeys.MAIL... |
public boolean isAutoLogin() { return GetterUtil.getBoolean( CompanyPropsUtil.get( getCompanyId(), PropsUtil.COMPANY_SECURITY_AUTO_LOGIN)); | public boolean isAutoLogin() throws PortalException, SystemException { return PrefsPropsUtil.getBoolean( getCompanyId(), PropsUtil.COMPANY_SECURITY_AUTO_LOGIN); | public boolean isAutoLogin() { return GetterUtil.getBoolean( CompanyPropsUtil.get( getCompanyId(), PropsUtil.COMPANY_SECURITY_AUTO_LOGIN)); } |
setModified(true); | public void setKey(String key) { if (((key == null) && (_key != null)) || ((key != null) && (_key == null)) || ((key != null) && (_key != null) && !key.equals(_key))) { if (!XSS_ALLOW_KEY) { key = XSSUtil.strip(key); } _key = key; setModified(true); } } | |
if (selResource.equals(User.class.getName())) { | if (selResource.equals(Group.class.getName())) { if (!GroupPermission.contains( permissionChecker, resourcePrimKey, ActionKeys.PERMISSIONS)) { SessionErrors.add(req, PrincipalException.class.getName()); setForward(req, "portlet.portlet_configuration.error"); } } else if (selResource.equals(User.class.getName())) { | 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 (calEvent.isNew() || calEvent.isModified()) { session = openSession(); if (calEvent.isNew()) { CalEvent calEventModel = new CalEvent(); calEventModel.setEventId(calEvent.getEventId()); calEventModel.setGroupId(calEvent.getGroupId()); calEventModel.setCompanyId(calEvent.getCompanyId()); calEventModel.setUserId(calEv... | session = openSession(); session.saveOrUpdate(calEvent); session.flush(); calEvent.setNew(false); | public com.liferay.portlet.calendar.model.CalEvent update( com.liferay.portlet.calendar.model.CalEvent calEvent) throws SystemException { Session session = null; try { if (calEvent.isNew() || calEvent.isModified()) { session = openSession(); if (calEvent.isNew()) { CalEvent calEventModel = new CalEvent... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.