rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
setModified(true); | public void setItemIds(String itemIds) { if (((itemIds == null) && (_itemIds != null)) || ((itemIds != null) && (_itemIds == null)) || ((itemIds != null) && (_itemIds != null) && !itemIds.equals(_itemIds))) { if (!XSS_ALLOW_ITEMIDS) { itemIds = XSSUtil.strip(itemIds); } _itemIds = itemIds; setModi... | |
Group group = null; if (Validator.isNotNull(groupId)) { group = GroupLocalServiceUtil.getGroup(groupId); } if (group == null) { group = user.getGroup(); } | Group group = GroupLocalServiceUtil.getGroup(groupId); | protected void checkPermissions(PortletRequest req) throws Exception { // See LEP-850 ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); User user = themeDisplay.getUser(); String groupId = ParamUtil.getString(req, "groupId"); Group group = null; if (Validator.isNotNull(groupId)... |
if (cmd.equals("actions")) { updateActions(req, res); | if (cmd.equals("user_permissions")) { updateUserPermissions(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("actions")) { updateActions(req, res); } else if (cmd.equals("user_permissions"))... |
else if (cmd.equals("user_permissions")) { updateUserPermissions(req, res); } | String redirect = ParamUtil.getString(req, "permissionsRedirect"); sendRedirect(req, res, redirect); | 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("actions")) { updateActions(req, res); } else if (cmd.equals("user_permissions"))... |
e instanceof NoSuchUserException || | 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("actions")) { updateActions(req, res); } else if (cmd.equals("user_permissions"))... | |
protected void updateUserPermissions(ActionRequest req, ActionResponse res) throws Exception { | protected void updateUserPermissions(ActionRequest req) throws Exception { String resourceId = ParamUtil.getString(req, "resourceId"); String userId = ParamUtil.getString(req, "userIdsPosValue"); String[] actionIds = StringUtil.split( ParamUtil.getString(req, "userIdActionIds")); | protected void updateUserPermissions(ActionRequest req, ActionResponse res) throws Exception { String resourceId = ParamUtil.getString(req, "resourceId"); String assignmentType = ParamUtil.getString(req, "assignmentType"); String[] actionIds = StringUtil.split( ParamUtil.getString(req, "actionIds")); int action... |
String resourceId = ParamUtil.getString(req, "resourceId"); String assignmentType = ParamUtil.getString(req, "assignmentType"); String[] actionIds = StringUtil.split( ParamUtil.getString(req, "actionIds")); int actionPos = ParamUtil.getInteger(req, "actionPos"); String[] addUserIds = StringUtil.split( ParamUtil.getS... | PermissionServiceUtil.setUserPermissions(userId, actionIds, resourceId); | protected void updateUserPermissions(ActionRequest req, ActionResponse res) throws Exception { String resourceId = ParamUtil.getString(req, "resourceId"); String assignmentType = ParamUtil.getString(req, "assignmentType"); String[] actionIds = StringUtil.split( ParamUtil.getString(req, "actionIds")); int action... |
_log.error(e.getMessage()); | _log.error(e); | public static void setThreadValues(SessionContext sc) { String userId = null; try { userId = PrincipalThreadLocal.getName(); if (userId == null) { userId = getUserId(sc); PrincipalThreadLocal.setName(userId); } } catch (PrincipalException pe) { } try { PermissionChecker permissionChecker = Permi... |
Randomizer randomizer = new Randomizer(); int[] scrollIds = randomizer.nextInt( | int[] scrollIds = Randomizer.getInstance().nextInt( | public static List findByFeatured( String groupId, String[] categoryIds, int numOfItems) throws SystemException { List list = new ArrayList(numOfItems); int countByFeatured = countByFeatured(groupId, categoryIds); if (countByFeatured == 0) { return list; } Session session = null; try { session = Hibernate... |
if (_properties == null) { _properties = CollectionFactory.getHashMap(); } _properties.put(key, new String[] {value}); | public void setProperty(String key, String value) { } | |
if (igImage.isNew() || igImage.isModified()) { session = openSession(); if (igImage.isNew()) { IGImage igImageModel = new IGImage(); igImageModel.setCompanyId(igImage.getCompanyId()); igImageModel.setImageId(igImage.getImageId()); igImageModel.setUserId(igImage.getUserId()); igImageModel.setCreateDate(igImage.getCreat... | session = openSession(); session.saveOrUpdate(igImage); session.flush(); igImage.setNew(false); | public com.liferay.portlet.imagegallery.model.IGImage update( com.liferay.portlet.imagegallery.model.IGImage igImage) throws SystemException { Session session = null; try { if (igImage.isNew() || igImage.isModified()) { session = openSession(); if (igImage.isNew()) { IGImage igImageModel = new IGImage(... |
RuntimePortletUtil.processPortlet( renderPortletSB, ctx, req, res, renderRequest, renderResponse, rootPortletId, instanceId); | try { req.setAttribute(WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE); RuntimePortletUtil.processPortlet( renderPortletSB, ctx, req, res, renderRequest, renderResponse, rootPortletId, instanceId); } finally { req.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE); } | public static void doTag( String portletName, PageContext pageContext, ServletContext ctx, HttpServletRequest req, HttpServletResponse res) throws Exception { PortletRequest portletRequest = (PortletRequest)req.getAttribute(WebKeys.JAVAX_PORTLET_REQUEST); RenderRequest renderRequest = null; if ((portletReque... |
setModified(true); | public void setPreferences(String preferences) { if (((preferences == null) && (_preferences != null)) || ((preferences != null) && (_preferences == null)) || ((preferences != null) && (_preferences != null) && !preferences.equals(_preferences))) { if (!XSS_ALLOW_PREFERENCES) { preferences = XSSUtil.str... | |
throws NoSuchListException, com.liferay.portlet.addressbook.NoSuchContactException, SystemException { | throws SystemException { | public boolean containsABContact(String pk, String abContactPK) throws NoSuchListException, com.liferay.portlet.addressbook.NoSuchContactException, SystemException { Session session = null; try { session = openSession(); ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, pk); if (abListHBM ==... |
ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, pk); | SQLQuery q = session.createSQLQuery(SQL_CONTAINSABCONTACT); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.INTEGER); | public boolean containsABContact(String pk, String abContactPK) throws NoSuchListException, com.liferay.portlet.addressbook.NoSuchContactException, SystemException { Session session = null; try { session = openSession(); ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, pk); if (abListHBM ==... |
if (abListHBM == null) { _log.warn("No ABList exists with the primary key " + pk.toString()); throw new NoSuchListException( "No ABList exists with the primary key " + pk.toString()); | QueryPos qPos = QueryPos.getInstance(q); qPos.add(pk); qPos.add(abContactPK); Iterator itr = q.list().iterator(); if (itr.hasNext()) { Integer count = (Integer)itr.next(); if ((count != null) && (count.intValue() > 0)) { return true; } | public boolean containsABContact(String pk, String abContactPK) throws NoSuchListException, com.liferay.portlet.addressbook.NoSuchContactException, SystemException { Session session = null; try { session = openSession(); ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, pk); if (abListHBM ==... |
com.liferay.portlet.addressbook.service.persistence.ABContactHBM abContactHBM = null; abContactHBM = (com.liferay.portlet.addressbook.service.persistence.ABContactHBM)session.get(com.liferay.portlet.addressbook.service.persistence.ABContactHBM.class, abContactPK); if (abContactHBM == null) { _log.warn("No ABContact ex... | return false; | public boolean containsABContact(String pk, String abContactPK) throws NoSuchListException, com.liferay.portlet.addressbook.NoSuchContactException, SystemException { Session session = null; try { session = openSession(); ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, pk); if (abListHBM ==... |
return new com.liferay.portlet.addressbook.model.ABList(listId); | ABListHBM abListHBM = new ABListHBM(); abListHBM.setNew(true); abListHBM.setPrimaryKey(listId); return ABListHBMUtil.model(abListHBM); | public com.liferay.portlet.addressbook.model.ABList create(String listId) { return new com.liferay.portlet.addressbook.model.ABList(listId); } |
com.liferay.portlet.addressbook.model.ABList abList = ABListPool.get(listId); | public com.liferay.portlet.addressbook.model.ABList findByPrimaryKey( String listId) throws NoSuchListException, SystemException { com.liferay.portlet.addressbook.model.ABList abList = ABListPool.get(listId); Session session = null; try { if (abList == null) { session = openSession(); ABListHBM abListHBM =... | |
if (abList == null) { session = openSession(); | session = openSession(); | public com.liferay.portlet.addressbook.model.ABList findByPrimaryKey( String listId) throws NoSuchListException, SystemException { com.liferay.portlet.addressbook.model.ABList abList = ABListPool.get(listId); Session session = null; try { if (abList == null) { session = openSession(); ABListHBM abListHBM =... |
if (abListHBM == null) { _log.warn("No ABList exists with the primary key " + listId.toString()); throw new NoSuchListException( "No ABList exists with the primary key " + listId.toString()); } abList = ABListHBMUtil.model(abListHBM, false); | if (abListHBM == null) { _log.warn("No ABList exists with the primary key " + listId.toString()); throw new NoSuchListException( "No ABList exists with the primary key " + listId.toString()); | public com.liferay.portlet.addressbook.model.ABList findByPrimaryKey( String listId) throws NoSuchListException, SystemException { com.liferay.portlet.addressbook.model.ABList abList = ABListPool.get(listId); Session session = null; try { if (abList == null) { session = openSession(); ABListHBM abListHBM =... |
return abList; | return ABListHBMUtil.model(abListHBM); | public com.liferay.portlet.addressbook.model.ABList findByPrimaryKey( String listId) throws NoSuchListException, SystemException { com.liferay.portlet.addressbook.model.ABList abList = ABListPool.get(listId); Session session = null; try { if (abList == null) { session = openSession(); ABListHBM abListHBM =... |
com.liferay.portlet.addressbook.model.ABList abList = ABListHBMUtil.model(abListHBM); | public com.liferay.portlet.addressbook.model.ABList remove(String listId) throws NoSuchListException, SystemException { Session session = null; try { session = openSession(); ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, listId); if (abListHBM == null) { _log.warn("No ABList exists with the... | |
ABListPool.remove(listId); | public com.liferay.portlet.addressbook.model.ABList remove(String listId) throws NoSuchListException, SystemException { Session session = null; try { session = openSession(); ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, listId); if (abListHBM == null) { _log.warn("No ABList exists with the... | |
return abList; | return ABListHBMUtil.model(abListHBM); | public com.liferay.portlet.addressbook.model.ABList remove(String listId) throws NoSuchListException, SystemException { Session session = null; try { session = openSession(); ABListHBM abListHBM = (ABListHBM)session.get(ABListHBM.class, listId); if (abListHBM == null) { _log.warn("No ABList exists with the... |
ABListPool.remove((String)abListHBM.getPrimaryKey()); | public void removeByUserId(String userId) throws SystemException { Session session = null; try { session = openSession(); StringBuffer query = new StringBuffer(); query.append( "FROM ABList IN CLASS com.liferay.portlet.addressbook.service.persistence.ABListHBM WHERE "); query.append("userId = ?"); query... | |
ABListHBM abListHBM = new ABListHBM(abList.getListId(), abList.getUserId(), abList.getName()); | ABListHBM abListHBM = new ABListHBM(); abListHBM.setListId(abList.getListId()); abListHBM.setUserId(abList.getUserId()); abListHBM.setName(abList.getName()); abListHBM.setContacts(new HashSet()); | public com.liferay.portlet.addressbook.model.ABList update( com.liferay.portlet.addressbook.model.ABList abList) throws SystemException { Session session = null; try { if (abList.isNew() || abList.isModified()) { session = openSession(); if (abList.isNew()) { ABListHBM abListHBM = new ABListHBM(abList.... |
abListHBM = new ABListHBM(abList.getListId(), abList.getUserId(), abList.getName()); | abListHBM = new ABListHBM(); abListHBM.setListId(abList.getListId()); abListHBM.setUserId(abList.getUserId()); abListHBM.setName(abList.getName()); | public com.liferay.portlet.addressbook.model.ABList update( com.liferay.portlet.addressbook.model.ABList abList) throws SystemException { Session session = null; try { if (abList.isNew() || abList.isModified()) { session = openSession(); if (abList.isNew()) { ABListHBM abListHBM = new ABListHBM(abList.... |
abList.protect(); ABListPool.update(abList.getPrimaryKey(), abList); | public com.liferay.portlet.addressbook.model.ABList update( com.liferay.portlet.addressbook.model.ABList abList) throws SystemException { Session session = null; try { if (abList.isNew() || abList.isModified()) { session = openSession(); if (abList.isNew()) { ABListHBM abListHBM = new ABListHBM(abList.... | |
protected ABListHBM(String listId, String userId, String name) { _listId = listId; _userId = userId; _name = name; | protected ABListHBM() { | protected ABListHBM(String listId, String userId, String name) { _listId = listId; _userId = userId; _name = name; } |
java.lang.String abContactPK) throws com.liferay.portlet.addressbook.NoSuchListException, com.liferay.portlet.addressbook.NoSuchContactException, com.liferay.portal.SystemException { | java.lang.String abContactPK) throws com.liferay.portal.SystemException { | public static boolean containsABContact(java.lang.String pk, java.lang.String abContactPK) throws com.liferay.portlet.addressbook.NoSuchListException, com.liferay.portlet.addressbook.NoSuchContactException, com.liferay.portal.SystemException { return getPersistence().containsABContact(pk, abContactPK); } |
sb.append("q.setCacheable(true);"); | sb.append("q.setCacheable(false);"); | private void _createPersistence(Entity entity) throws IOException { List columnList = entity.getColumnList(); List finderList = entity.getFinderList(); String pkClassName = entity.getPKClassName(); String pkVarName = entity.getPKVarName(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + ... |
setModified(true); | public void setDiscussionId(String discussionId) { if (((discussionId == null) && (_discussionId != null)) || ((discussionId != null) && (_discussionId == null)) || ((discussionId != null) && (_discussionId != null) && !discussionId.equals(_discussionId))) { if (!XSS_ALLOW_DISCUSSIONID) { discussionId =... | |
JournalStructure structure = JournalStructureServiceUtil.getStructure( companyId, structureId); | if (Validator.isNotNull(curArticle.getStructureId())) { JournalStructure structure = JournalStructureServiceUtil.getStructure( companyId, structureId); | protected void updateArticle(ActionRequest req) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); Layout layout = (Layout)req.getAttribute(WebKeys.LAYOUT); String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); boolean autoArticleId = Para... |
content = JournalUtil.mergeLocaleContent( curArticle.getContent(), content, structure.getXsd()); | content = JournalUtil.mergeLocaleContent( curArticle.getContent(), content, structure.getXsd()); } | protected void updateArticle(ActionRequest req) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); Layout layout = (Layout)req.getAttribute(WebKeys.LAYOUT); String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); boolean autoArticleId = Para... |
setModified(true); | public void setCountryCode(String countryCode) { if (((countryCode == null) && (_countryCode != null)) || ((countryCode != null) && (_countryCode == null)) || ((countryCode != null) && (_countryCode != null) && !countryCode.equals(_countryCode))) { if (!XSS_ALLOW_COUNTRYCODE) { countryCode = XSSUtil.str... | |
cal.roll(Calendar.DAY_OF_MONTH, false); | cal.add(Calendar.DATE, -1); | private String _getPreviewHeaders(HttpServletRequest req) throws Exception { JSONObject jsonObj = new JSONObject(); String folderId = ParamUtil.getString(req, "folderId"); String sortBy = ParamUtil.getString(req, "sortBy"); boolean asc = ParamUtil.getBoolean(req, "asc"); SortedSet set; MailUtil.setCurrentFolder(... |
if (passwordTracker.isNew() || passwordTracker.isModified()) { session = openSession(); if (passwordTracker.isNew()) { PasswordTracker passwordTrackerModel = new PasswordTracker(); passwordTrackerModel.setPasswordTrackerId(passwordTracker.getPasswordTrackerId()); passwordTrackerModel.setUserId(passwordTracker.getUserI... | session = openSession(); session.saveOrUpdate(passwordTracker); session.flush(); passwordTracker.setNew(false); | public com.liferay.portal.model.PasswordTracker update( com.liferay.portal.model.PasswordTracker passwordTracker) throws SystemException { Session session = null; try { if (passwordTracker.isNew() || passwordTracker.isModified()) { session = openSession(); if (passwordTracker.isNew()) { PasswordTracker... |
CommonPermission.checkPermission( getPermissionChecker(), className, classPK, ActionKeys.UPDATE); | public EmailAddress addEmailAddress( String className, String classPK, String address, String typeId, boolean primary) throws PortalException, SystemException { return EmailAddressLocalServiceUtil.addEmailAddress( getUserId(), className, classPK, address, typeId, primary); } | |
EmailAddress emailAddress = EmailAddressUtil.findByPrimaryKey(emailAddressId); CommonPermission.checkPermission( getPermissionChecker(), emailAddress.getClassName(), emailAddress.getClassPK(), ActionKeys.UPDATE); | public void deleteEmailAddress(String emailAddressId) throws PortalException, SystemException { EmailAddressLocalServiceUtil.deleteEmailAddress(emailAddressId); } | |
return EmailAddressUtil.findByPrimaryKey(emailAddressId); | EmailAddress emailAddress = EmailAddressUtil.findByPrimaryKey(emailAddressId); CommonPermission.checkPermission( getPermissionChecker(), emailAddress.getClassName(), emailAddress.getClassPK(), ActionKeys.VIEW); return emailAddress; | public EmailAddress getEmailAddress(String emailAddressId) throws PortalException, SystemException { return EmailAddressUtil.findByPrimaryKey(emailAddressId); } |
CommonPermission.checkPermission( getPermissionChecker(), className, classPK, ActionKeys.VIEW); | public List getEmailAddresses(String className, String classPK) throws PortalException, SystemException { return EmailAddressLocalServiceUtil.getEmailAddresses( getUser().getCompanyId(), className, classPK); } | |
EmailAddress emailAddress = EmailAddressUtil.findByPrimaryKey(emailAddressId); CommonPermission.checkPermission( getPermissionChecker(), emailAddress.getClassName(), emailAddress.getClassPK(), ActionKeys.UPDATE); | public EmailAddress updateEmailAddress( String emailAddressId, String address, String typeId, boolean primary) throws PortalException, SystemException { return EmailAddressLocalServiceUtil.updateEmailAddress( emailAddressId, address, typeId, primary); } | |
super.init(config); | public void init(ServletConfig config) throws ServletException { super.init(config); String servletClass = config.getInitParameter("servlet-class"); ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _servlet = (HttpServlet)classLoader.loadClass( servletClass).newInstance(); } catch (Cl... | |
catch (IOException e) { e.printStackTrace(); | catch (Exception e) { _log.warn(e); | public void whoJoinSession(SwitchboardSession ss, MsnFriend join) { try { if (_to.equals(join.getLoginName())) { ss.sendInstantMessage(new MimeMessage(_msg)); ss.cleanUp(); } } catch (IOException e) { e.printStackTrace(); } _msn.removeMsnListener(this); } |
categoryIdsQuery.add(new TermQuery(new Term( "categoryId", categoryIds[i])), false, false); | Term term = new Term("categoryId", categoryIds[i]); TermQuery termQuery = new TermQuery(term); categoryIdsQuery.add(termQuery, BooleanClause.Occur.SHOULD); | public Hits search( String companyId, String groupId, String userId, String[] categoryIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQu... |
booleanQuery.add(categoryIdsQuery, true, false); | booleanQuery.add(categoryIdsQuery, BooleanClause.Occur.MUST); | public Hits search( String companyId, String groupId, String userId, String[] categoryIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQu... |
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 userId, String[] categoryIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQu... |
public com.liferay.portal.model.Group addGroup(java.lang.String companyId, | public com.liferay.portal.model.Group addGroup(java.lang.String userId, | public com.liferay.portal.model.Group addGroup(java.lang.String companyId, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
if (listType.isNew() || listType.isModified()) { session = openSession(); if (listType.isNew()) { ListType listTypeModel = new ListType(); listTypeModel.setListTypeId(listType.getListTypeId()); listTypeModel.setName(listType.getName()); listTypeModel.setType(listType.getType()); session.save(listTypeModel); session.fl... | session = openSession(); session.saveOrUpdate(listType); session.flush(); listType.setNew(false); | public com.liferay.portal.model.ListType update( com.liferay.portal.model.ListType listType) throws SystemException { Session session = null; try { if (listType.isNew() || listType.isModified()) { session = openSession(); if (listType.isNew()) { ListType listTypeModel = new ListType(); listTypeModel... |
q.setCacheable(true); | q.setCacheable(false); | public int getShoppingItemPricesSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETSHOPPINGITEMPRICESSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPo... |
if (!LiferayWindowState.isPopUp(req)) { | if (!isAction() && !LiferayWindowState.isExclusive(req) && !LiferayWindowState.isPopUp(req)) { | protected void init( HttpServletRequest req, Portlet portlet, CachePortlet cachePortlet, PortletContext portletCtx, WindowState windowState, PortletMode portletMode, PortletPreferences prefs, String plid) { _portletName = portlet.getPortletId(); String prefix = PortalUtil.getPortletNamespace(_portletName); Dynam... |
value = getCreateDate().compareTo(website.getCreateDate()); | value = DateUtil.compareTo(getCreateDate(), website.getCreateDate()); | public int compareTo(Object obj) { if (obj == null) { return -1; } Website website = (Website)obj; int value = 0; value = getCreateDate().compareTo(website.getCreateDate()); if (value != 0) { return value; } return 0; } |
e instanceof CaptchaException || | e instanceof CaptchaTextException || | 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... |
ActionRequestImpl reqImpl = (ActionRequestImpl)req; ActionResponseImpl resImpl = (ActionResponseImpl)res; | actionReqImpl = (ActionRequestImpl)req; actionResImpl = (ActionResponseImpl)res; | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
httpReq = reqImpl.getHttpServletRequest(); httpRes = resImpl.getHttpServletResponse(); | httpReq = actionReqImpl.getHttpServletRequest(); httpRes = actionResImpl.getHttpServletResponse(); | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
RenderRequestImpl reqImpl = (RenderRequestImpl)req; RenderResponseImpl resImpl = (RenderResponseImpl)res; | renderReqImpl = (RenderRequestImpl)req; renderResImpl = (RenderResponseImpl)res; | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
httpReq = reqImpl.getHttpServletRequest(); httpRes = resImpl.getHttpServletResponse(); | httpReq = renderReqImpl.getHttpServletRequest(); httpRes = renderResImpl.getHttpServletResponse(); | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
ActionRequest actionReq = (ActionRequest)req; ActionResponse actionRes = (ActionResponse)res; | ActionRequestImpl actionReqImpl = (ActionRequestImpl)req; ActionResponseImpl actionResImpl = (ActionResponseImpl)res; | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
_portlet.processAction(actionReq, actionRes); | _portlet.processAction(actionReqImpl, actionResImpl); properties = actionResImpl.getProperties(); | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
RenderRequest renderReq = (RenderRequest)req; RenderResponse renderRes = (RenderResponse)res; | RenderRequestImpl renderReqImpl = (RenderRequestImpl)req; RenderResponseImpl renderResImpl = (RenderResponseImpl)res; | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
_portlet.render(renderReq, renderRes); | _portlet.render(renderReqImpl, renderResImpl); properties = renderResImpl.getProperties(); } } if ((properties != null) && (properties.size() > 0)) { String expCache = (String)properties.get( RenderResponse.EXPIRATION_CACHE); if ((expCache != null) && (_expCache != null)) { _expCache = new Integer(GetterUtil.getInte... | private void _invoke( PortletRequest req, PortletResponse res, boolean action) throws IOException, PortletException { if (_portletConfig.isWARFile()) { String path = StringPool.SLASH + _portletConfig.getPortletName() + "/invoke"; RequestDispatcher rd = _portletCtx.getServletContext().getRequestDispatcher... |
setModified(true); | public void setFirstReadDate(Date firstReadDate) { if (((firstReadDate == null) && (_firstReadDate != null)) || ((firstReadDate != null) && (_firstReadDate == null)) || ((firstReadDate != null) && (_firstReadDate != null) && !firstReadDate.equals(_firstReadDate))) { _firstReadDate = firstReadDate; setMod... | |
setModified(true); | public void setLastReadDate(Date lastReadDate) { if (((lastReadDate == null) && (_lastReadDate != null)) || ((lastReadDate != null) && (_lastReadDate == null)) || ((lastReadDate != null) && (_lastReadDate != null) && !lastReadDate.equals(_lastReadDate))) { _lastReadDate = lastReadDate; setModified(true);... | |
setModified(true); | public void setReceiptId(String receiptId) { if (((receiptId == null) && (_receiptId != null)) || ((receiptId != null) && (_receiptId == null)) || ((receiptId != null) && (_receiptId != null) && !receiptId.equals(_receiptId))) { if (!XSS_ALLOW_RECEIPTID) { receiptId = XSSUtil.strip(receiptId); } _re... | |
setModified(true); | public void setRecipientAddress(String recipientAddress) { if (((recipientAddress == null) && (_recipientAddress != null)) || ((recipientAddress != null) && (_recipientAddress == null)) || ((recipientAddress != null) && (_recipientAddress != null) && !recipientAddress.equals(_recipientAddress))) { if (!XSS... | |
setModified(true); | public void setRecipientName(String recipientName) { if (((recipientName == null) && (_recipientName != null)) || ((recipientName != null) && (_recipientName == null)) || ((recipientName != null) && (_recipientName != null) && !recipientName.equals(_recipientName))) { if (!XSS_ALLOW_RECIPIENTNAME) { rec... | |
setModified(true); | public void setSentDate(Date sentDate) { if (((sentDate == null) && (_sentDate != null)) || ((sentDate != null) && (_sentDate == null)) || ((sentDate != null) && (_sentDate != null) && !sentDate.equals(_sentDate))) { _sentDate = sentDate; setModified(true); } } | |
java.lang.String groupId, java.lang.String userId, java.lang.String name, java.lang.String primKey, boolean portletActions, boolean addCommunityPermissions, boolean addGuestPermissions) | java.lang.String groupId, java.lang.String name, boolean portletActions) | public void addResources(java.lang.String companyId, java.lang.String groupId, java.lang.String userId, java.lang.String name, java.lang.String primKey, boolean portletActions, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemExce... |
getService().addResources(companyId, groupId, userId, name, primKey, portletActions, addCommunityPermissions, addGuestPermissions); | getService().addResources(companyId, groupId, name, portletActions); | public void addResources(java.lang.String companyId, java.lang.String groupId, java.lang.String userId, java.lang.String name, java.lang.String primKey, boolean portletActions, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemExce... |
companyId, plid, languageId);; | companyId, plid, languageId, isIe); | public void doFilter( ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { if (USE_LAYOUT_CACHE_FILTER) { _log.debug("Layout Cache is enabled"); } else { _log.debug("Layout Cache is disabled"); } HttpServletRequest request = (HttpServletRequest)req; HttpServle... |
LayoutCacheUtil.putLayoutCacheResponseData( companyId, plid, languageId, layoutCacheResponseData); | LayoutCacheUtil.putLayoutCacheResponseData(companyId, plid, languageId, isIe, layoutCacheResponseData); | public void doFilter( ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { if (USE_LAYOUT_CACHE_FILTER) { _log.debug("Layout Cache is enabled"); } else { _log.debug("Layout Cache is disabled"); } HttpServletRequest request = (HttpServletRequest)req; HttpServle... |
infoBox.textDisplay.setPage(url); } catch (IOException e) {} | infoBox.getTextForInput(new URL(url), false); } catch (Exception e) {e.printStackTrace();} | public static void setBrowserUrl(String url) { try { infoBox.textDisplay.setPage(url); } catch (IOException e) {} } |
String content, RuntimeLogic runtimeLogic) | HttpServletRequest req, String content, RuntimeLogic runtimeLogic) | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
StringBuffer sb = new StringBuffer(); | try { req.setAttribute(WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE); | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); | StringBuffer sb = new StringBuffer(); | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
while (y != -1) { sb.append(content.substring(x, y)); | int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
int close1 = content.indexOf(runtimeLogic.getClose1Tag(), y); int close2 = content.indexOf(runtimeLogic.getClose2Tag(), y); | while (y != -1) { sb.append(content.substring(x, y)); | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
if ((close2 == -1) || ((close1 != -1) && (close1 < close2))) { x = close1 + runtimeLogic.getClose1Tag().length(); } else { x = close2 + runtimeLogic.getClose2Tag().length(); | int close1 = content.indexOf(runtimeLogic.getClose1Tag(), y); int close2 = content.indexOf(runtimeLogic.getClose2Tag(), y); if ((close2 == -1) || ((close1 != -1) && (close1 < close2))) { x = close1 + runtimeLogic.getClose1Tag().length(); } else { x = close2 + runtimeLogic.getClose2Tag().length(); } runtimeLogic.proce... | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
runtimeLogic.processXML(sb, content.substring(y, x)); | if (y == -1) { sb.append(content.substring(x, content.length())); } | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
y = content.indexOf(runtimeLogic.getOpenTag(), x); | return sb.toString(); | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
if (y == -1) { sb.append(content.substring(x, content.length())); | finally { req.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE); | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... |
return sb.toString(); | public static String processXML( String content, RuntimeLogic runtimeLogic) throws Exception { if (Validator.isNull(content)) { return StringPool.BLANK; } StringBuffer sb = new StringBuffer(); int x = 0; int y = content.indexOf(runtimeLogic.getOpenTag()); while (y != -1) { sb.append(content.substring(x, y... | |
if (!Validator.isNumber(jbossPrefix)) { jbossPrefix = "1"; } | 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 (appServerType.startsWith("jboss")) { deployDir = jbossPrefix + deployDir; } else if (appServerType.equals("jetty") || appServerType.equals("oc4j") || appServerType.equals("orion") || appServerType.equals("resin") || appServerType.equals("tomcat")) { | if (appServerType.equals("jetty") || appServerType.equals("oc4j") || appServerType.equals("orion") || appServerType.equals("resin") || appServerType.equals("tomcat")) { | protected void deploy() throws Exception { try { File[] files = FileUtil.sortFiles(new File(baseDir).listFiles()); for (int i = 0; i < files.length; i++) { File srcFile = files[i]; boolean deploy = false; if (srcFile.getName().endsWith(".war")) { deploy = true; if ((wars.size() > 0) && (!wa... |
displayName = displayName.substring(0, displayName.length() - 4); | protected String getDisplayName(File srcFile) { String displayName = srcFile.getName(); displayName = displayName.substring(0, displayName.length() - 4); if (displayName.startsWith(jbossPrefix)) { displayName = displayName.substring(1, displayName.length()); } return displayName; } | |
if (displayName.startsWith(jbossPrefix)) { displayName = displayName.substring(1, displayName.length()); } return displayName; | return displayName.substring(0, displayName.length() - 4); | protected String getDisplayName(File srcFile) { String displayName = srcFile.getName(); displayName = displayName.substring(0, displayName.length() - 4); if (displayName.startsWith(jbossPrefix)) { displayName = displayName.substring(1, displayName.length()); } return displayName; } |
ServletContext portalCtx = ctx.getContext( CompanyPropsUtil.get(_companyId, PropsUtil.PORTAL_CTX)); | ServletContext portalCtx = null; try { portalCtx = ctx.getContext( PrefsPropsUtil.getString(_companyId, PropsUtil.PORTAL_CTX)); } catch (Exception e) { _log.error(e); } | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { if (!PortalInstances.matches()) { res.setContentType(Constants.TEXT_HTML); String html = ContentUtil.get( "com/liferay/portal/dependencies/init.html"); res.getOutputStream().print(html); return; } ... |
public ThreadLastPostDateComparator(boolean asc) { _asc = asc; | public ThreadLastPostDateComparator() { this(false); | public ThreadLastPostDateComparator(boolean asc) { _asc = asc; } |
"/WEB-INF/liferay-portlet.xml")) | "/WEB-INF/liferay-portlet.xml")), Http.URLtoString(ctx.getResource("/WEB-INF/web.xml")) | public void invokeDeploy(HotDeployEvent event) throws HotDeployException { String servletContextName = null; try { // Servlet context ServletContext ctx = event.getServletContext(); servletContextName = StringUtil.replace( ctx.getServletContextName(), StringPool.SPACE, StringPool.UNDERLINE); if (_log.i... |
System.out.println("1"); | public void invokeDeploy(HotDeployEvent event) throws HotDeployException { String servletContextName = null; try { // Servlet context ServletContext ctx = event.getServletContext(); servletContextName = StringUtil.replace( ctx.getServletContextName(), StringPool.SPACE, StringPool.UNDERLINE); if (_log.i... | |
LiferayServletContextProviderWrapper. | ServletContextProvider. | public void invokeDeploy(HotDeployEvent event) throws HotDeployException { String servletContextName = null; try { // Servlet context ServletContext ctx = event.getServletContext(); servletContextName = StringUtil.replace( ctx.getServletContextName(), StringPool.SPACE, StringPool.UNDERLINE); if (_log.i... |
System.out.println("4"); | public void invokeDeploy(HotDeployEvent event) throws HotDeployException { String servletContextName = null; try { // Servlet context ServletContext ctx = event.getServletContext(); servletContextName = StringUtil.replace( ctx.getServletContextName(), StringPool.SPACE, StringPool.UNDERLINE); if (_log.i... | |
if (orgLabor.isNew() || orgLabor.isModified()) { session = openSession(); if (orgLabor.isNew()) { OrgLabor orgLaborModel = new OrgLabor(); orgLaborModel.setOrgLaborId(orgLabor.getOrgLaborId()); orgLaborModel.setOrganizationId(orgLabor.getOrganizationId()); orgLaborModel.setTypeId(orgLabor.getTypeId()); orgLaborModel.s... | session = openSession(); session.saveOrUpdate(orgLabor); session.flush(); orgLabor.setNew(false); | public com.liferay.portal.model.OrgLabor update( com.liferay.portal.model.OrgLabor orgLabor) throws SystemException { Session session = null; try { if (orgLabor.isNew() || orgLabor.isModified()) { session = openSession(); if (orgLabor.isNew()) { OrgLabor orgLaborModel = new OrgLabor(); orgLaborModel... |
if (req instanceof RenderRequestImpl) { httpReq = ((RenderRequestImpl)req).getHttpServletRequest(); | if (req instanceof ActionRequestImpl) { httpReq = new LiferayStrutsRequestImpl((ActionRequestImpl)req); | public HttpServletRequest getHttpServletRequest( GenericPortlet portlet, PortletRequest req) { HttpServletRequest httpReq = null; if (req instanceof RenderRequestImpl) { httpReq = ((RenderRequestImpl)req).getHttpServletRequest(); } else { httpReq = ((ActionRequestImpl)req).getHttpServletRequest(); } return ... |
httpReq = ((ActionRequestImpl)req).getHttpServletRequest(); | httpReq = new LiferayStrutsRequestImpl((RenderRequestImpl)req); | public HttpServletRequest getHttpServletRequest( GenericPortlet portlet, PortletRequest req) { HttpServletRequest httpReq = null; if (req instanceof RenderRequestImpl) { httpReq = ((RenderRequestImpl)req).getHttpServletRequest(); } else { httpReq = ((ActionRequestImpl)req).getHttpServletRequest(); } return ... |
return new LiferayStrutsRequestImpl(httpReq); | return httpReq; | public HttpServletRequest getHttpServletRequest( GenericPortlet portlet, PortletRequest req) { HttpServletRequest httpReq = null; if (req instanceof RenderRequestImpl) { httpReq = ((RenderRequestImpl)req).getHttpServletRequest(); } else { httpReq = ((ActionRequestImpl)req).getHttpServletRequest(); } return ... |
public LiferayStrutsRequestImpl(HttpServletRequest req) { super(req); | public LiferayStrutsRequestImpl(ActionRequestImpl req) { this(req.getHttpServletRequest()); HttpServletRequestWrapper httpReq = (HttpServletRequestWrapper)req.getHttpServletRequest(); | public LiferayStrutsRequestImpl(HttpServletRequest req) { super(req); _strutsAttributes = (Map)req.getAttribute("STRUTS_BRIDGES_ATTRIBUTES"); if (_strutsAttributes == null) { _strutsAttributes = CollectionFactory.getHashMap(); req.setAttribute("STRUTS_BRIDGES_ATTRIBUTES", _strutsAttributes); } } |
_strutsAttributes = (Map)req.getAttribute("STRUTS_BRIDGES_ATTRIBUTES"); | UploadServletRequest uploadReq = PortalUtil.getUploadServletRequest(httpReq); | public LiferayStrutsRequestImpl(HttpServletRequest req) { super(req); _strutsAttributes = (Map)req.getAttribute("STRUTS_BRIDGES_ATTRIBUTES"); if (_strutsAttributes == null) { _strutsAttributes = CollectionFactory.getHashMap(); req.setAttribute("STRUTS_BRIDGES_ATTRIBUTES", _strutsAttributes); } } |
if (_strutsAttributes == null) { _strutsAttributes = CollectionFactory.getHashMap(); req.setAttribute("STRUTS_BRIDGES_ATTRIBUTES", _strutsAttributes); | if (uploadReq == null) { return; | public LiferayStrutsRequestImpl(HttpServletRequest req) { super(req); _strutsAttributes = (Map)req.getAttribute("STRUTS_BRIDGES_ATTRIBUTES"); if (_strutsAttributes == null) { _strutsAttributes = CollectionFactory.getHashMap(); req.setAttribute("STRUTS_BRIDGES_ATTRIBUTES", _strutsAttributes); } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.