rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
private static IMAPFolder _getCurrentFolder(HttpSession ses)
private static IMAPFolder _getCurrentFolder(IMAPFolder folder)
private static IMAPFolder _getCurrentFolder(HttpSession ses) throws Exception { IMAPFolder folder = (IMAPFolder)ses.getAttribute(WebKeys.MAIL_FOLDER); if (folder != null) { return folder; } throw new Exception("A folder must first be selected"); }
IMAPFolder folder = (IMAPFolder)ses.getAttribute(WebKeys.MAIL_FOLDER);
private static IMAPFolder _getCurrentFolder(HttpSession ses) throws Exception { IMAPFolder folder = (IMAPFolder)ses.getAttribute(WebKeys.MAIL_FOLDER); if (folder != null) { return folder; } throw new Exception("A folder must first be selected"); }
throw new Exception("A folder must first be selected");
else { throw new Exception("A folder must first be selected"); }
private static IMAPFolder _getCurrentFolder(HttpSession ses) throws Exception { IMAPFolder folder = (IMAPFolder)ses.getAttribute(WebKeys.MAIL_FOLDER); if (folder != null) { return folder; } throw new Exception("A folder must first be selected"); }
public void setDestination(String LatLon) { toPoint.set(LatLon,CWPoint.CW);
public void setDestination(CWPoint dest){ toPoint.set(dest);
public void setDestination(String LatLon) { toPoint.set(LatLon,CWPoint.CW); btnGoto.setText(toPoint.toString(currFormat)); mainT.select(this); }
while (uploadReq == null) { if (reqWrapper instanceof UploadServletRequest) { uploadReq = (UploadServletRequest)reqWrapper; } else { reqWrapper = (HttpServletRequestWrapper)reqWrapper.getRequest(); } }
uploadReq = getUploadServletRequest(reqWrapper);
public static UploadPortletRequest getUploadPortletRequest( ActionRequest req) throws IOException { ActionRequestImpl actionReq = (ActionRequestImpl)req; DynamicServletRequest dynamicReq = (DynamicServletRequest)actionReq.getHttpServletRequest(); UploadServletRequest uploadReq = null; HttpServletRequestWrapper ...
getUser().getCompanyId(), parentOrganizationId, name, regionId, countryId, statusId, location);
getUserId(), parentOrganizationId, name, regionId, countryId, statusId, location);
public Organization addOrganization( String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { return OrganizationLocalServiceUtil.addOrganization( getUser().getCompanyId(), parentOrganizationId, name, regionId, c...
checkPermission(organizationId, ActionKeys.DELETE);
public void deleteOrganization(String organizationId) throws PortalException, SystemException { OrganizationLocalServiceUtil.deleteOrganization(organizationId); }
checkPermission(organizationId, ActionKeys.UPDATE);
public Organization updateOrganization( String organizationId, String parentOrganizationId, String name, String regionId, String countryId, String statusId, boolean location) throws PortalException, SystemException { return OrganizationLocalServiceUtil.updateOrganization( getUser().getCompanyId(), organizati...
ActionRequestImpl reqImpl = (ActionRequestImpl)req; HttpServletRequest originalReq = getOriginalServletRequest( reqImpl.getHttpServletRequest()); if (LiferayWindowState.isExclusive(originalReq)) { return; }
public static void copyRequestParameters( ActionRequest req, ActionResponse res) { // Set the request parameters as the render parameters try { ActionResponseImpl resImpl = (ActionResponseImpl)res; Map renderParameters = resImpl.getRenderParameters(); res.setRenderParameter("p_p_action", "1"); Enumeration e...
ImageLocalServiceUtil.deleteByImageId(userId + ".");
ImageLocalServiceUtil.deleteImages(userId + ".");
private void _upgradeUser() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_USER); rs = ps.executeQuery(); while (rs.next()) { String userId = rs.getString("userId"...
MessageWait msgWait = new MessageWait();
MessageWait msgWait = jabberSes.getMessageWait(); if (msgWait != null) { jabberSes.setMessageWait(null); msgWait.notify(); } msgWait = new MessageWait();
protected JSONObject getUpdates(HttpServletRequest req) { HttpSession ses = req.getSession(); JabberSession jabberSes = (JabberSession) ses.getAttribute(WebKeys.JABBER_XMPP_SESSION); JSONObject jo = new JSONObject(); String waitCmd = ""; try { MessageWait msgWait = new MessageWait(); msgWait.setSessionId(ses....
if (pollsVote.isNew() || pollsVote.isModified()) { session = openSession(); if (pollsVote.isNew()) { PollsVote pollsVoteModel = new PollsVote(); pollsVoteModel.setQuestionId(pollsVote.getQuestionId()); pollsVoteModel.setUserId(pollsVote.getUserId()); pollsVoteModel.setChoiceId(pollsVote.getChoiceId()); pollsVoteModel....
session = openSession(); session.saveOrUpdate(pollsVote); session.flush(); pollsVote.setNew(false);
public com.liferay.portlet.polls.model.PollsVote update( com.liferay.portlet.polls.model.PollsVote pollsVote) throws SystemException { Session session = null; try { if (pollsVote.isNew() || pollsVote.isModified()) { session = openSession(); if (pollsVote.isNew()) { PollsVote pollsVoteModel = new PollsV...
setModified(true);
public void setPrimKey(String primKey) { if (((primKey == null) && (_primKey != null)) || ((primKey != null) && (_primKey == null)) || ((primKey != null) && (_primKey != null) && !primKey.equals(_primKey))) { if (!XSS_ALLOW_PRIMKEY) { primKey = XSSUtil.strip(primKey); } _primKey = primKey; setModi...
setModified(true);
public void setScope(String scope) { if (((scope == null) && (_scope != null)) || ((scope != null) && (_scope == null)) || ((scope != null) && (_scope != null) && !scope.equals(_scope))) { if (!XSS_ALLOW_SCOPE) { scope = XSSUtil.strip(scope); } _scope = scope; setModified(true); } }
java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions)
java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions)
public static void addMessageResources(java.lang.String categoryId, java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalServ...
mbMessageLocalService.addMessageResources(categoryId, topicId, messageId, addCommunityPermissions, addGuestPermissions);
mbMessageLocalService.addMessageResources(categoryId, messageId, addCommunityPermissions, addGuestPermissions);
public static void addMessageResources(java.lang.String categoryId, java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalServ...
public static void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId)
public static void deleteDiscussionMessage(java.lang.String messageId)
public static void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalService.deleteDiscussio...
mbMessageLocalService.deleteDiscussionMessage(topicId, messageId);
mbMessageLocalService.deleteDiscussionMessage(messageId);
public static void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalService.deleteDiscussio...
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 { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalService.deleteMessage(topicId, me...
mbMessageLocalService.deleteMessage(topicId, messageId);
mbMessageLocalService.deleteMessage(messageId);
public static void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalService.deleteMessage(topicId, me...
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public static com.liferay.portlet.messageboards.model.MBMessage getMessage( java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); retu...
return mbMessageLocalService.getMessage(topicId, messageId);
return mbMessageLocalService.getMessage(messageId);
public static com.liferay.portlet.messageboards.model.MBMessage getMessage( java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); retu...
java.lang.String topicId, java.lang.String messageId, java.lang.String userId)
java.lang.String messageId, java.lang.String userId)
public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay( java.lang.String topicId, java.lang.String messageId, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessage...
return mbMessageLocalService.getMessageDisplay(topicId, messageId, userId);
return mbMessageLocalService.getMessageDisplay(messageId, userId);
public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay( java.lang.String topicId, java.lang.String messageId, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessage...
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public static void subscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalServi...
mbMessageLocalService.subscribeMessage(userId, topicId, messageId);
mbMessageLocalService.subscribeMessage(userId, messageId);
public static void subscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalServi...
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public static void unsubscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalSer...
mbMessageLocalService.unsubscribeMessage(userId, topicId, messageId);
mbMessageLocalService.unsubscribeMessage(userId, messageId);
public static void unsubscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageLocalService = MBMessageLocalServiceFactory.getService(); mbMessageLocalSer...
java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body)
java.lang.String messageId, java.lang.String subject, java.lang.String body)
public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageL...
return mbMessageLocalService.updateDiscussionMessage(topicId, messageId, subject, body);
return mbMessageLocalService.updateDiscussionMessage(messageId, subject, body);
public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageLocalService mbMessageL...
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, javax.portlet.PortletPreferences prefs) throws com.liferay.portal.PortalException...
return mbMessageLocalService.updateMessage(topicId, messageId, categoryId, subject, body, files, prefs);
return mbMessageLocalService.updateMessage(messageId, categoryId, subject, body, files, prefs);
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, javax.portlet.PortletPreferences prefs) throws com.liferay.portal.PortalException...
se.printStackTrace();
_log.error(se);
private void _shutdown() { try { if (!_scheduler.isShutdown()) { _scheduler.shutdown(); } } catch (SchedulerException se) { se.printStackTrace(); } }
se.printStackTrace();
_log.error(se);
private void _start() { StdSchedulerFactory sf = new StdSchedulerFactory(); try { _scheduler = sf.getScheduler(); _scheduler.start(); } catch (SchedulerException se) { se.printStackTrace(); } }
if (website.isNew() || website.isModified()) { session = openSession(); if (website.isNew()) { Website websiteModel = new Website(); websiteModel.setWebsiteId(website.getWebsiteId()); websiteModel.setCompanyId(website.getCompanyId()); websiteModel.setUserId(website.getUserId()); websiteModel.setUserName(website.getUse...
session = openSession(); session.saveOrUpdate(website); session.flush(); website.setNew(false);
public com.liferay.portal.model.Website update( com.liferay.portal.model.Website website) throws SystemException { Session session = null; try { if (website.isNew() || website.isModified()) { session = openSession(); if (website.isNew()) { Website websiteModel = new Website(); websiteModel.setWebsit...
JSONArray jRoster = getEntries(req).getJSONArray("roster"); jo.put("roster", jRoster);
JSONObject addEntry(HttpServletRequest req) { JSONObject jo = new JSONObject(); try { String email = ParamUtil.getString(req, "email"); String companyId = PortalUtil.getCompanyId(req); MessagingUtil.addRosterEntry(req.getSession(), companyId, email); JSONArray jRoster = getEntries(req).getJSONArray("roster")...
rosterList.add(rosterEntries.next());
RosterEntry entry = (RosterEntry)rosterEntries.next(); if (entry.getType() != RosterPacket.ItemType.FROM) { rosterList.add(entry); }
protected JSONObject getEntries(HttpServletRequest req) { JSONObject jo = new JSONObject(); Roster roster = MessagingUtil.getRoster(req.getSession()); List rosterList = new ArrayList(); Iterator rosterEntries = roster.getEntries(); JSONArray ja = new JSONArray(); while (rosterEntries.hasNext()) { rosterList.ad...
Collections.sort(rosterList, new NameComparator()); for (int i = 0; i < rosterList.size(); i++) { JSONObject jEntry = new JSONObject(); RosterEntry entry = (RosterEntry)rosterList.get(i); jEntry.put("user", MessagingUtil.getUserId(entry)); jEntry.put("name", entry.getName()); jEntry.put("status", MessagingUtil.getPr...
if (rosterList.size() > 0) { Collections.sort(rosterList, new NameComparator()); for (int i = 0; i < rosterList.size(); i++) { JSONObject jEntry = new JSONObject(); RosterEntry entry = (RosterEntry)rosterList.get(i); jEntry.put("user", MessagingUtil.getUserId(entry)); jEntry.put("name", entry.getName()); jEntry.put(...
protected JSONObject getEntries(HttpServletRequest req) { JSONObject jo = new JSONObject(); Roster roster = MessagingUtil.getRoster(req.getSession()); List rosterList = new ArrayList(); Iterator rosterEntries = roster.getEntries(); JSONArray ja = new JSONArray(); while (rosterEntries.hasNext()) { rosterList.ad...
if (shoppingCart.isNew() || shoppingCart.isModified()) { session = openSession(); if (shoppingCart.isNew()) { ShoppingCart shoppingCartModel = new ShoppingCart(); shoppingCartModel.setCartId(shoppingCart.getCartId()); shoppingCartModel.setGroupId(shoppingCart.getGroupId()); shoppingCartModel.setCompanyId(shoppingCart....
session = openSession(); session.saveOrUpdate(shoppingCart); session.flush(); shoppingCart.setNew(false);
public com.liferay.portlet.shopping.model.ShoppingCart update( com.liferay.portlet.shopping.model.ShoppingCart shoppingCart) throws SystemException { Session session = null; try { if (shoppingCart.isNew() || shoppingCart.isModified()) { session = openSession(); if (shoppingCart.isNew()) { ShoppingCart ...
ABContact c = new ABContact(null);
ABContact c = new ABContact();
private ABContact _createContact(String[] values, Map defs, DateFormat df) { ABContact c = new ABContact(null); c.setFirstName(getValue(values, defs, "First")); c.setLastName(getValue(values, defs, "Last")); c.setEmailAddress(getValue(values, defs, "Email")); c.setHomeStreet(getValue(values, defs, "Home Address")...
java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions)
java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions)
public void addMessageResources(java.lang.String categoryId, java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().addMessageResources(categoryId, topicId, m...
getService().addMessageResources(categoryId, topicId, messageId,
getService().addMessageResources(categoryId, messageId,
public void addMessageResources(java.lang.String categoryId, java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().addMessageResources(categoryId, topicId, m...
public void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId)
public void deleteDiscussionMessage(java.lang.String messageId)
public void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().deleteDiscussionMessage(topicId, messageId); }
getService().deleteDiscussionMessage(topicId, messageId);
getService().deleteDiscussionMessage(messageId);
public void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().deleteDiscussionMessage(topicId, messageId); }
public void deleteMessage(java.lang.String topicId, java.lang.String messageId)
public void deleteMessage(java.lang.String messageId)
public void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().deleteMessage(topicId, messageId); }
getService().deleteMessage(topicId, messageId);
getService().deleteMessage(messageId);
public void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().deleteMessage(topicId, messageId); }
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public com.liferay.portlet.messageboards.model.MBMessage getMessage( java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().getMessage(topicId, messageId); }
return getService().getMessage(topicId, messageId);
return getService().getMessage(messageId);
public com.liferay.portlet.messageboards.model.MBMessage getMessage( java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().getMessage(topicId, messageId); }
java.lang.String topicId, java.lang.String messageId, java.lang.String userId)
java.lang.String messageId, java.lang.String userId)
public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay( java.lang.String topicId, java.lang.String messageId, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().getMessageDisplay(topicId, messageId, userId); }
return getService().getMessageDisplay(topicId, messageId, userId);
return getService().getMessageDisplay(messageId, userId);
public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay( java.lang.String topicId, java.lang.String messageId, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().getMessageDisplay(topicId, messageId, userId); }
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public void subscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().subscribeMessage(userId, topicId, messageId); }
getService().subscribeMessage(userId, topicId, messageId);
getService().subscribeMessage(userId, messageId);
public void subscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().subscribeMessage(userId, topicId, messageId); }
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public void unsubscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().unsubscribeMessage(userId, topicId, messageId); }
getService().unsubscribeMessage(userId, topicId, messageId);
getService().unsubscribeMessage(userId, messageId);
public void unsubscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { getService().unsubscribeMessage(userId, topicId, messageId); }
java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body)
java.lang.String messageId, java.lang.String subject, java.lang.String body)
public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().updateDiscussionMessage(top...
return getService().updateDiscussionMessage(topicId, messageId, subject, body);
return getService().updateDiscussionMessage(messageId, subject, body);
public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().updateDiscussionMessage(top...
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 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, javax.portlet.PortletPreferences prefs) throws com.liferay.portal.PortalException, co...
return getService().updateMessage(topicId, messageId, categoryId, subject, body, files, prefs);
return getService().updateMessage(messageId, categoryId, subject, body, files, prefs);
public 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, javax.portlet.PortletPreferences prefs) throws com.liferay.portal.PortalException, co...
if (emailType.equals("requested") || emailType.equals("review")) { String tempToName = fromName; String tempToAddress = fromAddress; fromName = toName; fromAddress = toAddress; toName = tempToName; toAddress = tempToAddress; }
protected void sendEmail( JournalArticle article, String articleURL, PortletPreferences prefs, String emailType) throws PortalException, SystemException { try { if (emailType.equals("denied") && JournalUtil.getEmailArticleApprovalDeniedEnabled(prefs)) { } else if (emailType.equals("granted") && Jou...
if (contact.isNew() || contact.isModified()) { session = openSession(); if (contact.isNew()) { Contact contactModel = new Contact(); contactModel.setContactId(contact.getContactId()); contactModel.setCompanyId(contact.getCompanyId()); contactModel.setUserId(contact.getUserId()); contactModel.setUserName(contact.getUse...
session = openSession(); session.saveOrUpdate(contact); session.flush(); contact.setNew(false);
public com.liferay.portal.model.Contact update( com.liferay.portal.model.Contact contact) throws SystemException { Session session = null; try { if (contact.isNew() || contact.isModified()) { session = openSession(); if (contact.isNew()) { Contact contactModel = new Contact(); contactModel.setContac...
if (permission.isNew() || permission.isModified()) { session = openSession(); if (permission.isNew()) { Permission permissionModel = new Permission(); permissionModel.setPermissionId(permission.getPermissionId()); permissionModel.setCompanyId(permission.getCompanyId()); permissionModel.setActionId(permission.getAction...
session = openSession(); session.saveOrUpdate(permission); session.flush(); permission.setNew(false);
public com.liferay.portal.model.Permission update( com.liferay.portal.model.Permission permission) throws SystemException { Session session = null; try { if (permission.isNew() || permission.isModified()) { session = openSession(); if (permission.isNew()) { Permission permissionModel = new Permission()...
value = msg1.getCreateDate().compareTo(msg2.getCreateDate());
value = DateUtil.compareTo( msg1.getCreateDate(), msg2.getCreateDate());
public int compare(Object obj1, Object obj2) { MBMessage msg1 = (MBMessage)obj1; MBMessage msg2 = (MBMessage)obj2; int value = msg1.getParentMessageId().compareTo(msg2.getParentMessageId()); if (value == 0) { value = msg1.getCreateDate().compareTo(msg2.getCreateDate()); } if (value == 0) { value = msg1.get...
setModified(true);
public void setReadCount(int readCount) { if (readCount != _readCount) { _readCount = readCount; setModified(true); } }
setModified(true);
public void setVersionUserId(String versionUserId) { if (((versionUserId == null) && (_versionUserId != null)) || ((versionUserId != null) && (_versionUserId == null)) || ((versionUserId != null) && (_versionUserId != null) && !versionUserId.equals(_versionUserId))) { if (!XSS_ALLOW_VERSIONUSERID) { ver...
setModified(true);
public void setVersionUserName(String versionUserName) { if (((versionUserName == null) && (_versionUserName != null)) || ((versionUserName != null) && (_versionUserName == null)) || ((versionUserName != null) && (_versionUserName != null) && !versionUserName.equals(_versionUserName))) { if (!XSS_ALLOW_VER...
JdbcDirectory directory = new JdbcDirectory(
directory = new JdbcDirectory(
public Directory _getLuceneDir(String companyId) { if (PropsUtil.get(PropsUtil.LUCENE_STORE_TYPE).equals( _LUCENE_STORE_TYPE_JDBC)) { try { DataSource ds = (DataSource)JNDIUtil.lookup( new InitialContext(), Constants.DATA_SOURCE); JdbcDirectory directory = new JdbcDirectory( ds, _dialect, _getTable...
if (!directory.tableExists()) { directory.create();
JdbcDirectory jdbcDir = (JdbcDirectory) directory; if (!jdbcDir.tableExists()) { jdbcDir.create();
public Directory _getLuceneDir(String companyId) { if (PropsUtil.get(PropsUtil.LUCENE_STORE_TYPE).equals( _LUCENE_STORE_TYPE_JDBC)) { try { DataSource ds = (DataSource)JNDIUtil.lookup( new InitialContext(), Constants.DATA_SOURCE); JdbcDirectory directory = new JdbcDirectory( ds, _dialect, _getTable...
return directory;
public Directory _getLuceneDir(String companyId) { if (PropsUtil.get(PropsUtil.LUCENE_STORE_TYPE).equals( _LUCENE_STORE_TYPE_JDBC)) { try { DataSource ds = (DataSource)JNDIUtil.lookup( new InitialContext(), Constants.DATA_SOURCE); JdbcDirectory directory = new JdbcDirectory( ds, _dialect, _getTable...
return FSDirectory.getDirectory( PropsUtil.get(PropsUtil.LUCENE_DIR) + companyId + StringPool.SLASH, true);
directory = FSDirectory.getDirectory(path, false);
public Directory _getLuceneDir(String companyId) { if (PropsUtil.get(PropsUtil.LUCENE_STORE_TYPE).equals( _LUCENE_STORE_TYPE_JDBC)) { try { DataSource ds = (DataSource)JNDIUtil.lookup( new InitialContext(), Constants.DATA_SOURCE); JdbcDirectory directory = new JdbcDirectory( ds, _dialect, _getTable...
throw new RuntimeException(ioe);
try { directory = FSDirectory.getDirectory(path, true); } catch (IOException ioe2) { throw new RuntimeException(ioe2); }
public Directory _getLuceneDir(String companyId) { if (PropsUtil.get(PropsUtil.LUCENE_STORE_TYPE).equals( _LUCENE_STORE_TYPE_JDBC)) { try { DataSource ds = (DataSource)JNDIUtil.lookup( new InitialContext(), Constants.DATA_SOURCE); JdbcDirectory directory = new JdbcDirectory( ds, _dialect, _getTable...
return directory;
public Directory _getLuceneDir(String companyId) { if (PropsUtil.get(PropsUtil.LUCENE_STORE_TYPE).equals( _LUCENE_STORE_TYPE_JDBC)) { try { DataSource ds = (DataSource)JNDIUtil.lookup( new InitialContext(), Constants.DATA_SOURCE); JdbcDirectory directory = new JdbcDirectory( ds, _dialect, _getTable...
value = getCreateDate().compareTo(shoppingCoupon.getCreateDate());
value = DateUtil.compareTo(getCreateDate(), shoppingCoupon.getCreateDate());
public int compareTo(Object obj) { if (obj == null) { return -1; } ShoppingCoupon shoppingCoupon = (ShoppingCoupon)obj; int value = 0; value = getCreateDate().compareTo(shoppingCoupon.getCreateDate()); if (value != 0) { return value; } return 0; }
java.lang.String folderId, java.lang.String name, java.lang.String title, java.lang.String description)
java.lang.String userId, java.lang.String folderId, java.lang.String newFolderId, java.lang.String name, java.lang.String sourceFileName, java.lang.String title, java.lang.String description, byte[] byteArray)
public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry( java.lang.String folderId, java.lang.String name, java.lang.String title, java.lang.String description) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { DLFileEntryLocalService dlFileEntryLocalSer...
return dlFileEntryLocalService.updateFileEntry(folderId, name, title, description);
return dlFileEntryLocalService.updateFileEntry(userId, folderId, newFolderId, name, sourceFileName, title, description, byteArray);
public static com.liferay.portlet.documentlibrary.model.DLFileEntry updateFileEntry( java.lang.String folderId, java.lang.String name, java.lang.String title, java.lang.String description) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { DLFileEntryLocalService dlFileEntryLocalSer...
path = StringUtil.replace(path, "&amp;", "&"); try { _portletURL.setWindowState(_windowState);
String encodedURL = path; if (path.startsWith(_contextPath + _servletMapping)) { path = StringUtil.replace(path, "&amp;", "&"); try { _portletURL.setWindowState(_windowState); } catch (WindowStateException wse) { } try { _portletURL.setPortletMode(_portletMode); } catch (PortletModeException pme) { } _portletU...
public String encodeURL(String path) { _log.debug("Encode " + path); // Struts uses &amp; instead of & to delimit parameter key value pairs // when you set the "name" attribute for html:link. path = StringUtil.replace(path, "&amp;", "&"); // Reset portlet URL settings so it can be reused try { _portletURL.setW...
catch (WindowStateException wse) { } try { _portletURL.setPortletMode(_portletMode); } catch (PortletModeException pme) { } _portletURL.setParameters(new HashMap()); _portletURL.setAction(false); String strutsAction = path; String queryString = StringPool.BLANK; int pos = strutsAction.indexOf("?"); if (pos != -1)...
return encodedURL;
public String encodeURL(String path) { _log.debug("Encode " + path); // Struts uses &amp; instead of & to delimit parameter key value pairs // when you set the "name" attribute for html:link. path = StringUtil.replace(path, "&amp;", "&"); // Reset portlet URL settings so it can be reused try { _portletURL.setW...
pageSettingsURL.setParameter("groupId", portletGroupId);
public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { HttpSession ses = req.getSession(); // Company Company company = PortalUtil.getCompany(req); String companyId = company.getCompanyId(); // Paths String contextPath = CompanyPropsUtil.get( companyId, PropsUt...
if (!compatibleVersions.contains(ReleaseInfo.getVersion())) {
if (!compatibleVersions.contains( _getVersion(ReleaseInfo.getVersion()))) {
private static Set _readThemes( String servletContextName, ServletContext ctx, String xml) throws DocumentException, IOException { Set themeIds = new HashSet(); if (xml == null) { return themeIds; } SAXReader reader = SAXReaderFactory.getInstance(); Document doc = reader.read(new StringReader(xml)); Element...
setModified(true);
public void setRoles(String roles) { if (((roles == null) && (_roles != null)) || ((roles != null) && (_roles == null)) || ((roles != null) && (_roles != null) && !roles.equals(_roles))) { if (!XSS_ALLOW_ROLES) { roles = XSSUtil.strip(roles); } _roles = roles; setModified(true); } }
if (image.isNew() || image.isModified()) { session = openSession(); if (image.isNew()) { Image imageModel = new Image(); imageModel.setImageId(image.getImageId()); imageModel.setModifiedDate(image.getModifiedDate()); imageModel.setText(image.getText()); session.save(imageModel); session.flush(); } else { Image imageMo...
session = openSession(); session.saveOrUpdate(image); session.flush(); image.setNew(false);
public com.liferay.portal.model.Image update( com.liferay.portal.model.Image image) throws SystemException { Session session = null; try { if (image.isNew() || image.isModified()) { session = openSession(); if (image.isNew()) { Image imageModel = new Image(); imageModel.setImageId(image.getImageId()...
roleHBM.setClassName(role.getClassName()); roleHBM.setClassPK(role.getClassPK());
public com.liferay.portal.model.Role update( com.liferay.portal.model.Role role) throws SystemException { Session session = null; try { if (role.isNew() || role.isModified()) { session = openSession(); if (role.isNew()) { RoleHBM roleHBM = new RoleHBM(); roleHBM.setRoleId(role.getRoleId()); role...
return new MailReceipt(getReceiptId(), getCompanyId(), getUserId(), getCreateDate(), getModifiedDate(), getRecipientName(), getRecipientAddress(), getSubject(), getSentDate(), getReadCount(), getFirstReadDate(), getLastReadDate());
MailReceipt clone = new MailReceipt(); clone.setReceiptId(getReceiptId()); clone.setCompanyId(getCompanyId()); clone.setUserId(getUserId()); clone.setCreateDate(getCreateDate()); clone.setModifiedDate(getModifiedDate()); clone.setRecipientName(getRecipientName()); clone.setRecipientAddress(getRecipientAddress()); clone...
public Object clone() { return new MailReceipt(getReceiptId(), getCompanyId(), getUserId(), getCreateDate(), getModifiedDate(), getRecipientName(), getRecipientAddress(), getSubject(), getSentDate(), getReadCount(), getFirstReadDate(), getLastReadDate()); }
public MailReceipt(String receiptId, String companyId, String userId, Date createDate, Date modifiedDate, String recipientName, String recipientAddress, String subject, Date sentDate, int readCount, Date firstReadDate, Date lastReadDate) { super(receiptId, companyId, userId, createDate, modifiedDate, recipientName, re...
public MailReceipt() {
public MailReceipt(String receiptId, String companyId, String userId, Date createDate, Date modifiedDate, String recipientName, String recipientAddress, String subject, Date sentDate, int readCount, Date firstReadDate, Date lastReadDate) { super(receiptId, companyId, userId, createDate, modifiedD...
_log.debug("Registering hot deploy listeners"); HotDeployUtil.registerListener(new HotDeployLayoutTemplateListener()); HotDeployUtil.registerListener(new HotDeployPortletListener()); HotDeployUtil.registerListener(new HotDeployThemeListener());
public void run(String[] ids) throws ActionException { // JCR try { if (GetterUtil.getBoolean(PropsUtil.get( PropsUtil.JCR_INITIALIZE_ON_STARTUP))) { JCRFactoryUtil.initialize(); } } catch (Exception e) { _log.error(e); } // Auto deploy try { _log.debug("Registering auto deploy directories"); F...
return AddressServiceUtil.getAddresses( Organization.class.getName(), getOrganizationId());
return AddressLocalServiceUtil.getAddresses( getCompanyId(), Organization.class.getName(), getOrganizationId());
public List getAddresses() throws PortalException, SystemException { return AddressServiceUtil.getAddresses( Organization.class.getName(), getOrganizationId()); }
String content = ContentUtils.getContentAsString(contents[0]);
String ticket = AuthenticationUtils.getCurrentTicket(); String content = Http.URLtoString(contents[0].getUrl() + "?ticket=" + ticket);
public static String getContent( String userId, String password, String uuid, String path) throws Exception { if (Validator.isNotNull(path)) { uuid = null; } else if (Validator.isNotNull(uuid)) { path = null; } else { return null; } try { AuthenticationUtils.startSession(userId, password); ContentS...
"Unable to file web service client proerties file. Using default.");
"Unable to file web service client properties file. Using default.");
public static String getEndpointAddress() { String endPoint = _DEFAULT_ENDPOINT_ADDRESS; ClassLoader cl = AlfrescoContentUtil.class.getClassLoader(); InputStream is = cl.getResourceAsStream(_PROPERTY_FILE_NAME); if (is != null) { Properties props = new Properties(); try { props.load(is); endPoint = ...
setModified(true);
public void setChoiceId(String choiceId) { if (((choiceId == null) && (_choiceId != null)) || ((choiceId != null) && (_choiceId == null)) || ((choiceId != null) && (_choiceId != null) && !choiceId.equals(_choiceId))) { if (!XSS_ALLOW_CHOICEID) { choiceId = XSSUtil.strip(choiceId); } _choiceId = choi...
setModified(true);
public void setQuestionId(String questionId) { if (((questionId == null) && (_questionId != null)) || ((questionId != null) && (_questionId == null)) || ((questionId != null) && (_questionId != null) && !questionId.equals(_questionId))) { if (!XSS_ALLOW_QUESTIONID) { questionId = XSSUtil.strip(questionI...
setModified(true);
public void setVoteDate(Date voteDate) { if (((voteDate == null) && (_voteDate != null)) || ((voteDate != null) && (_voteDate == null)) || ((voteDate != null) && (_voteDate != null) && !voteDate.equals(_voteDate))) { _voteDate = voteDate; setModified(true); } }
e.printStackTrace();
public void destroy() { // Wait for indexer to be gracefully interrupted if ((_indexer != null) && (!_indexer.isFinished()) && (_indexerThread != null)) { _log.warn("Waiting for Lucene indexer to shutdown"); _indexer.halt(); try { _indexerThread.join(THREAD_TIMEOUT); } catch (InterruptedException e) {...
ioe.printStackTrace();
_log.error(ioe);
public void init(ServletConfig config) throws ServletException { synchronized (LuceneServlet.class) { super.init(config); ServletContext ctx = getServletContext(); _companyId = ctx.getInitParameter("company_id"); if (GetterUtil.getBoolean( PropsUtil.get(PropsUtil.INDEX_ON_STARTUP))) { _indexer = new Lu...
setModified(true);
public void setFriendlyURL(String friendlyURL) { if (((friendlyURL == null) && (_friendlyURL != null)) || ((friendlyURL != null) && (_friendlyURL == null)) || ((friendlyURL != null) && (_friendlyURL != null) && !friendlyURL.equals(_friendlyURL))) { if (!XSS_ALLOW_FRIENDLYURL) { friendlyURL = XSSUtil.str...
setModified(true);
public void setParentGroupId(String parentGroupId) { if (((parentGroupId == null) && (_parentGroupId != null)) || ((parentGroupId != null) && (_parentGroupId == null)) || ((parentGroupId != null) && (_parentGroupId != null) && !parentGroupId.equals(_parentGroupId))) { if (!XSS_ALLOW_PARENTGROUPID) { par...
xsl = JournalUtil.formatXML(xsl);
if (JournalTemplate.LANG_TYPE_VM.equals(langType)) { xsl = JournalUtil.formatVM(xsl); } else { xsl = JournalUtil.formatXML(xsl); }
public JournalTemplate addTemplate( String userId, String templateId, boolean autoTemplateId, String plid, String structureId, String name, String description, String xsl, boolean formatXsl, String langType, boolean smallImage, String smallImageURL, File smallFile, boolean addCommunityPermissions, boolean ad...
xsl = JournalUtil.formatXML(xsl);
if (JournalTemplate.LANG_TYPE_VM.equals(langType)) { xsl = JournalUtil.formatVM(xsl); } else { xsl = JournalUtil.formatXML(xsl); }
public JournalTemplate updateTemplate( String companyId, String templateId, String structureId, String name, String description, String xsl, boolean formatXsl, String langType, boolean smallImage, String smallImageURL, File smallFile) throws PortalException, SystemException { // Template templateId = templa...
setModified(true);
public void setAltShipping(int altShipping) { if (altShipping != _altShipping) { _altShipping = altShipping; setModified(true); } }
setModified(true);
public void setCartId(String cartId) { if (((cartId == null) && (_cartId != null)) || ((cartId != null) && (_cartId == null)) || ((cartId != null) && (_cartId != null) && !cartId.equals(_cartId))) { if (!XSS_ALLOW_CARTID) { cartId = XSSUtil.strip(cartId); } _cartId = cartId; setModified(true); } ...
setModified(true);
public void setCouponIds(String couponIds) { if (((couponIds == null) && (_couponIds != null)) || ((couponIds != null) && (_couponIds == null)) || ((couponIds != null) && (_couponIds != null) && !couponIds.equals(_couponIds))) { if (!XSS_ALLOW_COUPONIDS) { couponIds = XSSUtil.strip(couponIds); } _co...
setModified(true);
public void setInsure(boolean insure) { if (insure != _insure) { _insure = insure; setModified(true); } }