rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Folder folder = _getCurrentFolder(userId); | IMAPFolder folder = _getCurrentFolder(userId); | public static void deleteMessages( String userId, String password, int [] messageUIDs) throws Exception { Folder folder = _getCurrentFolder(userId); if (!folder.getName().equals(MAIL_TRASH_NAME)) { moveMessages(userId, password, messageUIDs, MAIL_TRASH_NAME); } else { Message [] msgs = _getCurrentFold... |
_getCurrentFolder(userId).getMessages(messageUIDs); | _getCurrentFolder(userId).getMessagesByUID(messageUIDs); | public static void deleteMessages( String userId, String password, int [] messageUIDs) throws Exception { Folder folder = _getCurrentFolder(userId); if (!folder.getName().equals(MAIL_TRASH_NAME)) { moveMessages(userId, password, messageUIDs, MAIL_TRASH_NAME); } else { Message [] msgs = _getCurrentFold... |
_getCurrentFolder(userId).expunge(); | public static void deleteMessages( String userId, String password, int [] messageUIDs) throws Exception { Folder folder = _getCurrentFolder(userId); if (!folder.getName().equals(MAIL_TRASH_NAME)) { moveMessages(userId, password, messageUIDs, MAIL_TRASH_NAME); } else { Message [] msgs = _getCurrentFold... | |
Folder root = _getStore(userId, password).getDefaultFolder(); | IMAPFolder root = (IMAPFolder)_getStore(userId, password).getDefaultFolder(); | public static List getAllFolders(String userId, String password) throws Exception { List list = new ArrayList(); Folder root = _getStore(userId, password).getDefaultFolder(); try { Folder [] folders = root.list(); for (int i = 0; i < folders.length; i++) { if ((folders[i].getType() & Folder.HOLDS_MESSAGE... |
if ((folders[i].getType() & Folder.HOLDS_MESSAGES) != 0) { | if ((folders[i].getType() & IMAPFolder.HOLDS_MESSAGES) != 0) { | public static List getAllFolders(String userId, String password) throws Exception { List list = new ArrayList(); Folder root = _getStore(userId, password).getDefaultFolder(); try { Folder [] folders = root.list(); for (int i = 0; i < folders.length; i++) { if ((folders[i].getType() & Folder.HOLDS_MESSAGE... |
Message message = _getCurrentFolder(userId).getMessage(messageUID); | Message message = _getCurrentFolder(userId).getMessageByUID(messageUID); | public static MailMessage getMessage(String userId, int messageUID) throws Exception { MailMessage mm = null; try { Message message = _getCurrentFolder(userId).getMessage(messageUID); mm = new MailMessage(); mm.setSubject(message.getSubject()); mm.setFrom(message.getFrom()[0]); mm.setTo(message.getRecipie... |
me.setMsgNum(msgs[ii].getMessageNumber()); | me.setMsgUID(_getCurrentFolder(userId).getUID(msgs[ii])); | public static List getEnvelopes(String userId) throws Exception { List envelopes = new ArrayList(); Message [] msgs = _getCurrentFolder(userId).getMessages(); FetchProfile fp = new FetchProfile(); fp.add(FetchProfile.Item.ENVELOPE); fp.add(FetchProfile.Item.FLAGS); _getCurrentFold... |
int [] messageUIDs, String toFolderName) | long [] messageUIDs, String toFolderName) | public static void moveMessages(String userId, String password, int [] messageUIDs, String toFolderName) throws Exception { if (_getCurrentFolder(userId).getName().equals(toFolderName)) { return; } Folder toFolder = null; try { toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.op... |
Folder toFolder = null; | IMAPFolder toFolder = null; | public static void moveMessages(String userId, String password, int [] messageUIDs, String toFolderName) throws Exception { if (_getCurrentFolder(userId).getName().equals(toFolderName)) { return; } Folder toFolder = null; try { toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.op... |
toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.open(Folder.READ_WRITE); | toFolder = (IMAPFolder)_getStore(userId, password).getFolder(toFolderName); toFolder.open(IMAPFolder.READ_WRITE); | public static void moveMessages(String userId, String password, int [] messageUIDs, String toFolderName) throws Exception { if (_getCurrentFolder(userId).getName().equals(toFolderName)) { return; } Folder toFolder = null; try { toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.op... |
Message [] msgs = _getCurrentFolder(userId).getMessages(messageUIDs); | Message [] msgs = _getCurrentFolder(userId).getMessagesByUID(messageUIDs); | public static void moveMessages(String userId, String password, int [] messageUIDs, String toFolderName) throws Exception { if (_getCurrentFolder(userId).getName().equals(toFolderName)) { return; } Folder toFolder = null; try { toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.op... |
_getCurrentFolder(userId).expunge(); | public static void moveMessages(String userId, String password, int [] messageUIDs, String toFolderName) throws Exception { if (_getCurrentFolder(userId).getName().equals(toFolderName)) { return; } Folder toFolder = null; try { toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.op... | |
setModified(true); | public void setDiscount(double discount) { if (discount != _discount) { _discount = discount; setModified(true); } } | |
setModified(true); | public void setItemPriceId(String itemPriceId) { if (((itemPriceId == null) && (_itemPriceId != null)) || ((itemPriceId != null) && (_itemPriceId == null)) || ((itemPriceId != null) && (_itemPriceId != null) && !itemPriceId.equals(_itemPriceId))) { if (!XSS_ALLOW_ITEMPRICEID) { itemPriceId = XSSUtil.str... | |
setModified(true); | public void setMaxQuantity(int maxQuantity) { if (maxQuantity != _maxQuantity) { _maxQuantity = maxQuantity; setModified(true); } } | |
setModified(true); | public void setMinQuantity(int minQuantity) { if (minQuantity != _minQuantity) { _minQuantity = minQuantity; setModified(true); } } | |
setModified(true); | public void setShipping(double shipping) { if (shipping != _shipping) { _shipping = shipping; setModified(true); } } | |
setModified(true); | public void setStatus(int status) { if (status != _status) { _status = status; setModified(true); } } | |
setModified(true); | public void setTaxable(boolean taxable) { if (taxable != _taxable) { _taxable = taxable; setModified(true); } } | |
setModified(true); | public void setUseShippingFormula(boolean useShippingFormula) { if (useShippingFormula != _useShippingFormula) { _useShippingFormula = useShippingFormula; setModified(true); } } | |
res.setContentType(Constants.TEXT_JAVASCRIPT); res.setHeader(HttpHeaders.CACHE_CONTROL, "no-cache"); if (ajaxId != null) { res.setHeader("Ajax-ID", ajaxId); | if (Validator.isNotNull(json)) { res.setContentType(Constants.TEXT_JAVASCRIPT); res.setHeader(HttpHeaders.CACHE_CONTROL, "no-cache"); if (ajaxId != null) { res.setHeader("Ajax-ID", ajaxId); } PrintWriter pw = res.getWriter(); pw.write(json); pw.close(); | public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { String callback = ParamUtil.getString(req, "callback"); String instance = ParamUtil.getString(req, "inst"); String ajaxId = ParamUtil.getString(req, "ajax_id", null); St... |
PrintWriter pw = res.getWriter(); pw.write(json); pw.close(); | public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { String callback = ParamUtil.getString(req, "callback"); String instance = ParamUtil.getString(req, "inst"); String ajaxId = ParamUtil.getString(req, "ajax_id", null); St... | |
buffer.append("\t\t").append("document.write(\"<img width=1 height=1 src=http: buffer.append(getServer()).append(".teljari.is/potency/potency.php?o='+service_id+';i='+portion+';p='+page+';j=1.0\" alt=\"\" border=\"0\" />')").append("\n"); | buffer.append("\t\t").append("document.write('<img width=\"1\" height=\"1\" src=\"http: buffer.append(getServer()).append(".teljari.is/potency/potency.php?o='+service_id+';i='+portion+';p='+page+';j=1.0\" alt=\"\" border=\"0\" />');").append("\n"); | protected void initializeComponent(FacesContext context) { IWContext iwc = IWContext.getIWContext(context); if (iwc.isInEditMode()) { getChildren().add(new Text("Modernus")); } else if (getPortion() == null) { getChildren().add(new Text("Portion must be set")); } else if (getServiceID() == null) { getChild... |
setModified(true); | public void setCategoryId(String categoryId) { if (((categoryId == null) && (_categoryId != null)) || ((categoryId != null) && (_categoryId == null)) || ((categoryId != null) && (_categoryId != null) && !categoryId.equals(_categoryId))) { if (!XSS_ALLOW_CATEGORYID) { categoryId = XSSUtil.strip(categoryI... | |
setModified(true); | public void setLastPostDate(Date lastPostDate) { if (((lastPostDate == null) && (_lastPostDate != null)) || ((lastPostDate != null) && (_lastPostDate == null)) || ((lastPostDate != null) && (_lastPostDate != null) && !lastPostDate.equals(_lastPostDate))) { _lastPostDate = lastPostDate; setModified(true);... | |
setModified(true); | public void setMessageCount(int messageCount) { if (messageCount != _messageCount) { _messageCount = messageCount; setModified(true); } } | |
setModified(true); | public void setRootMessageId(String rootMessageId) { if (((rootMessageId == null) && (_rootMessageId != null)) || ((rootMessageId != null) && (_rootMessageId == null)) || ((rootMessageId != null) && (_rootMessageId != null) && !rootMessageId.equals(_rootMessageId))) { if (!XSS_ALLOW_ROOTMESSAGEID) { roo... | |
setModified(true); | public void setThreadId(String threadId) { if (((threadId == null) && (_threadId != null)) || ((threadId != null) && (_threadId == null)) || ((threadId != null) && (_threadId != null) && !threadId.equals(_threadId))) { if (!XSS_ALLOW_THREADID) { threadId = XSSUtil.strip(threadId); } _threadId = thre... | |
setModified(true); | public void setTopicId(String topicId) { if (((topicId == null) && (_topicId != null)) || ((topicId != null) && (_topicId == null)) || ((topicId != null) && (_topicId != null) && !topicId.equals(_topicId))) { if (!XSS_ALLOW_TOPICID) { topicId = XSSUtil.strip(topicId); } _topicId = topicId; setModi... | |
setModified(true); | public void setViewCount(int viewCount) { if (viewCount != _viewCount) { _viewCount = viewCount; setModified(true); } } | |
LayoutCacheUtil.putLayoutCacheResponseData( _companyId, key, data); | if (data.getData().length > 0) { LayoutCacheUtil.putLayoutCacheResponseData( _companyId, key, data); } | 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... |
String companyId, String plid, String languageId) { | String companyId, String plid, String languageId, boolean isIe) { | public static LayoutCacheResponseData getLayoutCacheResponseData( String companyId, String plid, String languageId) { LayoutCacheResponseData data = null; if (Validator.isNull(plid)) { return null; } plid = plid.trim().toUpperCase(); String key = _encodeKey(companyId, plid + LANGUAGE + languageId); try { da... |
String key = _encodeKey(companyId, plid + LANGUAGE + languageId); | String key = _encodeKey(companyId, plid + LANGUAGE + languageId + IS_IE + Boolean.toString(isIe)); | public static LayoutCacheResponseData getLayoutCacheResponseData( String companyId, String plid, String languageId) { LayoutCacheResponseData data = null; if (Validator.isNull(plid)) { return null; } plid = plid.trim().toUpperCase(); String key = _encodeKey(companyId, plid + LANGUAGE + languageId); try { da... |
String companyId, String plid, String languageId, | String companyId, String plid, String languageId, boolean isIe, | public static void putLayoutCacheResponseData( String companyId, String plid, String languageId, LayoutCacheResponseData data) { if (data != null) { plid = plid.trim().toUpperCase(); String key = _encodeKey(companyId, plid + LANGUAGE + languageId); _cache.putInCache(key, data, GROUP_NAME_ARRAY); } } |
String key = _encodeKey(companyId, plid + LANGUAGE + languageId); | String key = _encodeKey(companyId, plid + LANGUAGE + languageId + IS_IE + Boolean.toString(isIe)); | public static void putLayoutCacheResponseData( String companyId, String plid, String languageId, LayoutCacheResponseData data) { if (data != null) { plid = plid.trim().toUpperCase(); String key = _encodeKey(companyId, plid + LANGUAGE + languageId); _cache.putInCache(key, data, GROUP_NAME_ARRAY); } } |
baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); | baseDir = PrefsPropsUtil.getString( PropsUtil.AUTO_DEPLOY_DEPLOY_DIR); destDir = PrefsPropsUtil.getString(PropsUtil.AUTO_DEPLOY_DEST_DIR); | public AutoLayoutTemplateDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); unpackWar = OmniadminUtil.getAutoDeployUnpackWar(); List jars = new ArrayList(); this.jars = jars; checkArguments();... |
unpackWar = OmniadminUtil.getAutoDeployUnpackWar(); | unpackWar = PrefsPropsUtil.getBoolean( PropsUtil.AUTO_DEPLOY_UNPACK_WAR); | public AutoLayoutTemplateDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); unpackWar = OmniadminUtil.getAutoDeployUnpackWar(); List jars = new ArrayList(); this.jars = jars; checkArguments();... |
CyrusVirtual model = null; | public CyrusVirtual findByPrimaryKey(String emailAddress) throws NoSuchCyrusVirtualException, SystemException { CyrusVirtual model = null; Session session = null; try { session = getSessionFactory().openSession(); CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, emailAddress); m... | |
CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, emailAddress); model = model(hbm); return model; | return (CyrusVirtual)session.load(CyrusVirtual.class, emailAddress); | public CyrusVirtual findByPrimaryKey(String emailAddress) throws NoSuchCyrusVirtualException, SystemException { CyrusVirtual model = null; Session session = null; try { session = getSessionFactory().openSession(); CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, emailAddress); m... |
StringBuffer query = new StringBuffer(); query.append("FROM CyrusVirtual "); query.append("IN CLASS "); query.append(CyrusVirtualHBM.class.getName()); query.append(" "); query.append("WHERE "); query.append("userId = ?"); Query q = session.createQuery(query.toString()); | Query q = session.createQuery(FIND_BY_USER_ID); | public List findByUserId(String userId) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); StringBuffer query = new StringBuffer(); query.append("FROM CyrusVirtual "); query.append("IN CLASS "); query.append(CyrusVirtualHBM.class.getName()); query.append("... |
Iterator itr = q.iterate(); List list = new ArrayList(); while (itr.hasNext()) { CyrusVirtualHBM hbm = (CyrusVirtualHBM)itr.next(); list.add(model(hbm)); } return list; | return q.list(); | public List findByUserId(String userId) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); StringBuffer query = new StringBuffer(); query.append("FROM CyrusVirtual "); query.append("IN CLASS "); query.append(CyrusVirtualHBM.class.getName()); query.append("... |
CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, emailAddress); | CyrusVirtual virtual = (CyrusVirtual)session.load( CyrusVirtual.class, emailAddress); | public void remove(String emailAddress) throws NoSuchCyrusVirtualException, SystemException { Session session = null; try { session = getSessionFactory().openSession(); CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, emailAddress); session.delete(hbm); session.flush(); } cat... |
session.delete(hbm); | session.delete(virtual); | public void remove(String emailAddress) throws NoSuchCyrusVirtualException, SystemException { Session session = null; try { session = getSessionFactory().openSession(); CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, emailAddress); session.delete(hbm); session.flush(); } cat... |
StringBuffer query = new StringBuffer(); query.append("FROM CyrusVirtual "); query.append("IN CLASS "); query.append(CyrusVirtualHBM.class.getName()); query.append(" "); query.append("WHERE "); query.append("userId = ?"); Query q = session.createQuery(query.toString()); | Query q = session.createQuery(FIND_BY_USER_ID); | public void removeByUserId(String userId) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); StringBuffer query = new StringBuffer(); query.append("FROM CyrusVirtual "); query.append("IN CLASS "); query.append(CyrusVirtualHBM.class.getName()); query.append... |
CyrusVirtualHBM hbm = (CyrusVirtualHBM)itr.next(); | CyrusVirtual virtual = (CyrusVirtual)itr.next(); | public void removeByUserId(String userId) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); StringBuffer query = new StringBuffer(); query.append("FROM CyrusVirtual "); query.append("IN CLASS "); query.append(CyrusVirtualHBM.class.getName()); query.append... |
session.delete(hbm); | session.delete(virtual); | public void removeByUserId(String userId) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); StringBuffer query = new StringBuffer(); query.append("FROM CyrusVirtual "); query.append("IN CLASS "); query.append(CyrusVirtualHBM.class.getName()); query.append... |
public void update(CyrusVirtual user) throws SystemException { | public void update(CyrusVirtual virtual) throws SystemException { | public void update(CyrusVirtual user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, user.getEmailAddress()); hbm.setUserId(user.getUserId()); session.flush(); } ... |
CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, user.getEmailAddress()); | CyrusVirtual virtualModel = (CyrusVirtual)session.load( CyrusVirtual.class, virtual.getEmailAddress()); | public void update(CyrusVirtual user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, user.getEmailAddress()); hbm.setUserId(user.getUserId()); session.flush(); } ... |
hbm.setUserId(user.getUserId()); | virtualModel.setUserId(virtual.getUserId()); | public void update(CyrusVirtual user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, user.getEmailAddress()); hbm.setUserId(user.getUserId()); session.flush(); } ... |
CyrusVirtualHBM hbm = new CyrusVirtualHBM( user.getEmailAddress(), user.getUserId()); | CyrusVirtual virtualModel = new CyrusVirtual( virtual.getEmailAddress(), virtual.getUserId()); | public void update(CyrusVirtual user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, user.getEmailAddress()); hbm.setUserId(user.getUserId()); session.flush(); } ... |
session.save(hbm); | session.save(virtualModel); | public void update(CyrusVirtual user) throws SystemException { Session session = null; try { session = getSessionFactory().openSession(); try { CyrusVirtualHBM hbm = (CyrusVirtualHBM)session.load( CyrusVirtualHBM.class, user.getEmailAddress()); hbm.setUserId(user.getUserId()); session.flush(); } ... |
public long getTotalSiteActivity(String siteId, List events); | public long getTotalSiteActivity(String siteId, List events, Date iDate, Date fDate); | public long getTotalSiteActivity(String siteId, List events); |
public long getTotalSiteUniqueVisits(String siteId); | public long getTotalSiteUniqueVisits(String siteId, Date iDate, Date fDate); | public long getTotalSiteUniqueVisits(String siteId); |
public long getTotalSiteVisits(String siteId); | public long getTotalSiteVisits(String siteId, Date iDate, Date fDate); | public long getTotalSiteVisits(String siteId); |
String companyId, String parentOrganizationId, String name, | String userId, String parentOrganizationId, String name, | public Organization addOrganization( String companyId, String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { // Organization parentOrganizationId = getParentOrganizationId( companyId, parentOrganizationId); ... |
companyId, parentOrganizationId); | user.getCompanyId(), parentOrganizationId); | public Organization addOrganization( String companyId, String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { // Organization parentOrganizationId = getParentOrganizationId( companyId, parentOrganizationId); ... |
companyId, parentOrganizationId, name, countryId, statusId, location); | user.getCompanyId(), parentOrganizationId, name, countryId, statusId, location); | public Organization addOrganization( String companyId, String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { // Organization parentOrganizationId = getParentOrganizationId( companyId, parentOrganizationId); ... |
organization.setCompanyId(companyId); | organization.setCompanyId(user.getCompanyId()); | public Organization addOrganization( String companyId, String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { // Organization parentOrganizationId = getParentOrganizationId( companyId, parentOrganizationId); ... |
organization.getCompanyId(), Organization.class.getName(), | userId, Organization.class.getName(), | public Organization addOrganization( String companyId, String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { // Organization parentOrganizationId = getParentOrganizationId( companyId, parentOrganizationId); ... |
addOrganizationResources(userId, organization); | public Organization addOrganization( String companyId, String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { // Organization parentOrganizationId = getParentOrganizationId( companyId, parentOrganizationId); ... | |
setModified(true); | public void setParentOrganizationId(String parentOrganizationId) { if (((parentOrganizationId == null) && (_parentOrganizationId != null)) || ((parentOrganizationId != null) && (_parentOrganizationId == null)) || ((parentOrganizationId != null) && (_parentOrganizationId != null) && !parentOrganizationI... | |
setModified(true); | public void setRegionId(String regionId) { if (((regionId == null) && (_regionId != null)) || ((regionId != null) && (_regionId == null)) || ((regionId != null) && (_regionId != null) && !regionId.equals(_regionId))) { if (!XSS_ALLOW_REGIONID) { regionId = XSSUtil.strip(regionId); } _regionId = regi... | |
setModified(true); | public void setCountryId(String countryId) { if (((countryId == null) && (_countryId != null)) || ((countryId != null) && (_countryId == null)) || ((countryId != null) && (_countryId != null) && !countryId.equals(_countryId))) { if (!XSS_ALLOW_COUNTRYID) { countryId = XSSUtil.strip(countryId); } _co... | |
setModified(true); | public void setStatusId(String statusId) { if (((statusId == null) && (_statusId != null)) || ((statusId != null) && (_statusId == null)) || ((statusId != null) && (_statusId != null) && !statusId.equals(_statusId))) { if (!XSS_ALLOW_STATUSID) { statusId = XSSUtil.strip(statusId); } _statusId = stat... | |
public void deleteOrganization( com.liferay.portal.model.Organization organization) | public void deleteOrganization(java.lang.String organizationId) | public void deleteOrganization( com.liferay.portal.model.Organization organization) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
setModified(true); | public void setComments(String comments) { if (((comments == null) && (_comments != null)) || ((comments != null) && (_comments == null)) || ((comments != null) && (_comments != null) && !comments.equals(_comments))) { if (!XSS_ALLOW_COMMENTS) { comments = XSSUtil.strip(comments); } _comments = comm... | |
PermissionChecker permissionChecker = PermissionCheckerFactory.create(user, true); | permissionChecker = PermissionCheckerFactory.create(user, true); | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ThemeDisplay themeDisplay = null; try { HttpSession ses = req.getSession(); if (_log.isDebugEnabled()) { _log.debug("URL " + req.getRequestURL()); } // The servlet accepts commands sent in the form... |
try { PermissionCheckerFactory.recycle(permissionChecker); } catch (Exception e) { } | public void service(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ThemeDisplay themeDisplay = null; try { HttpSession ses = req.getSession(); if (_log.isDebugEnabled()) { _log.debug("URL " + req.getRequestURL()); } // The servlet accepts commands sent in the form... | |
if (permissionChecker == null) { return; } | public static void recycle(PermissionChecker permissionChecker) throws Exception { if (_log.isDebugEnabled()) { _log.debug( "Recycling:\t" + _instance._pool.getNumIdle() + "\t" + _instance._pool.getNumActive()); } _instance._pool.returnObject(permissionChecker); } | |
String ownerId = Layout.getOwnerId(themeDisplay.getPlid()); String groupId = Layout.getGroupId(ownerId); | String portletId = ParamUtil.getString(req, "portletResource"); String rootPortletId = Portlet.getRootPortletId(portletId); | protected Portlet getPortlet(PortletRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); String ownerId = Layout.getOwnerId(t... |
String portletResource = ParamUtil.getString(req, "portletResource"); String resourcePrimKey = themeDisplay.getPlid() + Portlet.LAYOUT_SEPARATOR + portletResource; if (!permissionChecker.hasPermission( groupId, portletResource, resourcePrimKey, ActionKeys.CONFIGURATION) && !GroupPermission.contains( permissionChecker,... | if (!GroupPermission.contains( permissionChecker, themeDisplay.getPortletGroupId(), ActionKeys.MANAGE_LAYOUTS) && !LayoutPermission.contains( permissionChecker, themeDisplay.getLayout(), ActionKeys.UPDATE) && !PortletPermission.contains( permissionChecker, themeDisplay.getPlid(), rootPortletId, ActionKeys.CONFIGURATION... | protected Portlet getPortlet(PortletRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); String ownerId = Layout.getOwnerId(t... |
return PortletLocalServiceUtil.getPortletById( companyId, portletResource); | return PortletLocalServiceUtil.getPortletById(companyId, portletId); | protected Portlet getPortlet(PortletRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); String ownerId = Layout.getOwnerId(t... |
public static String getCompanyId(PortletRequest req) { String companyId = null; | public static String getCompanyId(HttpServletRequest req) { String companyId = (String)req.getSession().getAttribute(WebKeys.COMPANY_ID); | public static String getCompanyId(PortletRequest req) { String companyId = null; if (req instanceof ActionRequest) { companyId = getCompanyId((ActionRequest)req); } else { companyId = getCompanyId((RenderRequest)req); } return companyId; } |
if (req instanceof ActionRequest) { companyId = getCompanyId((ActionRequest)req); } else { companyId = getCompanyId((RenderRequest)req); | if (companyId == null) { companyId = (String)req.getAttribute(WebKeys.COMPANY_ID); | public static String getCompanyId(PortletRequest req) { String companyId = null; if (req instanceof ActionRequest) { companyId = getCompanyId((ActionRequest)req); } else { companyId = getCompanyId((RenderRequest)req); } return companyId; } |
OrganizationLocalServiceUtil.getUserOrganizations( | OrganizationServiceUtil.getUserOrganizations( | public boolean hasPermission( String groupId, String name, String primKey, String actionId) { if (signedIn && (permissionCheckerBag == null)) { try { List userOrgs = OrganizationLocalServiceUtil.getUserOrganizations( user.getUserId()); List userOrgGroups = GroupServiceUtil.getOrganizationsGroups( ... |
UserGroupLocalServiceUtil.getUserUserGroups( user.getUserId()); | UserGroupServiceUtil.getUserUserGroups(user.getUserId()); | public boolean hasPermission( String groupId, String name, String primKey, String actionId) { if (signedIn && (permissionCheckerBag == null)) { try { List userOrgs = OrganizationLocalServiceUtil.getUserOrganizations( user.getUserId()); List userOrgGroups = GroupServiceUtil.getOrganizationsGroups( ... |
groupId, Group.class.getName(), groupId, actionId); | null, Group.class.getName(), groupId, actionId); | public static boolean contains( PermissionChecker permissionChecker, String groupId, String actionId) { return permissionChecker.hasPermission( groupId, Group.class.getName(), groupId, actionId); } |
public com.liferay.portal.model.Role addRole(java.lang.String companyId, java.lang.String name) | public com.liferay.portal.model.Role addRole(java.lang.String userId, java.lang.String companyId, java.lang.String name) | public com.liferay.portal.model.Role addRole(java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException; |
private void _upgradeCategory() throws Exception { | private void _upgradeCategory( String categoryId, Timestamp createDate, Timestamp modifiedDate, Timestamp lastPostDate) throws Exception { | private void _upgradeCategory() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_CATEGORY_1); rs = ps.executeQuery(); while (rs.next()) { String topicId = rs.getStri... |
ResultSet rs = null; | private void _upgradeCategory() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_CATEGORY_1); rs = ps.executeQuery(); while (rs.next()) { String topicId = rs.getStri... | |
ps = con.prepareStatement(_UPGRADE_CATEGORY_1); | ps = con.prepareStatement(_UPGRADE_CATEGORY_2); | private void _upgradeCategory() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_CATEGORY_1); rs = ps.executeQuery(); while (rs.next()) { String topicId = rs.getStri... |
rs = ps.executeQuery(); | ps.setTimestamp(1, createDate); ps.setTimestamp(2, modifiedDate); ps.setTimestamp(3, lastPostDate); ps.setString(4, categoryId); | private void _upgradeCategory() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_CATEGORY_1); rs = ps.executeQuery(); while (rs.next()) { String topicId = rs.getStri... |
while (rs.next()) { String topicId = rs.getString("topicId"); String companyId = rs.getString("companyId"); String userId = rs.getString("userId"); Timestamp createDate = rs.getTimestamp("createDate"); Timestamp modifiedDate = rs.getTimestamp("modifiedDate"); String parentCategoryId = rs.getString("categoryId"); String... | ps.executeUpdate(); | private void _upgradeCategory() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_CATEGORY_1); rs = ps.executeQuery(); while (rs.next()) { String topicId = rs.getStri... |
DataAccess.cleanUp(con, ps, rs); | DataAccess.cleanUp(con, ps); | private void _upgradeCategory() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_CATEGORY_1); rs = ps.executeQuery(); while (rs.next()) { String topicId = rs.getStri... |
List kvpList = new ArrayList(); | List messages = new ArrayList(); | private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { List kvpList = new ArrayList(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setStri... |
kvpList.add(new KeyValuePair(oldMessageId, newMessageId)); | List files = _getFiles( companyId, topicId, oldMessageId, attachments); messages.add( new Object[] { companyId, threadId, oldMessageId, newMessageId, files }); | private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { List kvpList = new ArrayList(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setStri... |
for (int i = kvpList.size() - 1; i >= 0; i--) { KeyValuePair kvp = (KeyValuePair)kvpList.get(i); | for (int i = messages.size() - 1; i >= 0; i--) { Object[] array = (Object[])messages.get(i); | private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { List kvpList = new ArrayList(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setStri... |
String oldMessageId = kvp.getKey(); String newMessageId = kvp.getValue(); | String companyId = (String)array[0]; String threadId = (String)array[1]; String oldMessageId = (String)array[2]; String newMessageId = (String)array[3]; List files = (List)array[4]; | private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { List kvpList = new ArrayList(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setStri... |
ps = con.prepareStatement(_UPGRADE_MESSAGE_5); | ps = con.prepareStatement(_UPGRADE_MESSAGE_2); | private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { List kvpList = new ArrayList(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setStri... |
for (int i = 0; i < kvpList.size(); i++) { KeyValuePair kvp = (KeyValuePair)kvpList.get(i); | for (int i = 0; i < messages.size(); i++) { Object[] array = (Object[])messages.get(i); | private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { List kvpList = new ArrayList(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setStri... |
_upgradeFiles(companyId, threadId, newMessageId, files); | private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { List kvpList = new ArrayList(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setStri... | |
Role adminRole = RoleServiceUtil.getRole(companyId, Role.ADMINISTRATOR); | if (isCompanyAdmin(companyId, groupId, name)) { return true; } | protected boolean isAdmin(String companyId, String groupId, String name) throws PortalException, SystemException { Role adminRole = RoleServiceUtil.getRole(companyId, Role.ADMINISTRATOR); if (UserServiceUtil.hasRoleUser( adminRole.getRoleId(), user.getUserId())) { return true; } // You can further modify thi... |
if (UserServiceUtil.hasRoleUser( adminRole.getRoleId(), user.getUserId())) { | if (isCommunityAdmin(companyId, groupId, name)) { | protected boolean isAdmin(String companyId, String groupId, String name) throws PortalException, SystemException { Role adminRole = RoleServiceUtil.getRole(companyId, Role.ADMINISTRATOR); if (UserServiceUtil.hasRoleUser( adminRole.getRoleId(), user.getUserId())) { return true; } // You can further modify thi... |
public String getActualCompanyId() { if (isDefaultUser()) { return getActualCompanyId(getUserId()); | public static String getActualCompanyId(String defaultUserId) { if (isDefaultUser(defaultUserId)) { return defaultUserId.substring( 0, defaultUserId.indexOf(DEFAULT) - 1); | public String getActualCompanyId() { if (isDefaultUser()) { return getActualCompanyId(getUserId()); } else { return getCompanyId(); } } |
return getCompanyId(); | return null; | public String getActualCompanyId() { if (isDefaultUser()) { return getActualCompanyId(getUserId()); } else { return getCompanyId(); } } |
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 { RoleService roleService = RoleServiceFactory.getService(); return roleService.getRole(companyId, name); } catch (com.... |
return roleService.getRole(companyId, name); | return roleService.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 { RoleService roleService = RoleServiceFactory.getService(); return roleService.getRole(companyId, name); } catch (com.... |
clearGroups.clear(organizationId); clearUsers.clear(organizationId); | public Organization remove(String organizationId) throws NoSuchOrganizationException, SystemException { Session session = null; try { session = openSession(); Organization organization = (Organization)session.get(Organization.class, organizationId); if (organization == null) { _log.warn("No Organizatio... | |
return openSession(SESSION_FACTORY_NAME); | return openSession(SPRING_HIBERNATE_SESSION_FACTORY); | public static Session openSession() throws HibernateException { return openSession(SESSION_FACTORY_NAME); } |
return getDialect(SESSION_FACTORY_NAME); | return getDialect(SPRING_HIBERNATE_SESSION_FACTORY); | public static Dialect getDialect() { return getDialect(SESSION_FACTORY_NAME); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.