rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
copyRequestParameters = GetterUtil.get( | copyRequestParameters = GetterUtil.getBoolean( | public void init(PortletConfig config) throws PortletException { super.init(config); aboutAction = getInitParameter("about-action"); configAction = getInitParameter("config-action"); editAction = getInitParameter("edit-action"); editDefaultsAction = getInitParameter("edit-defaults-action"); helpAction = getInitP... |
value = getStartDate().compareTo(calEvent.getStartDate()); | value = DateUtil.compareTo(getStartDate(), calEvent.getStartDate()); | public int compareTo(Object obj) { if (obj == null) { return -1; } CalEvent calEvent = (CalEvent)obj; int value = 0; value = getStartDate().compareTo(calEvent.getStartDate()); if (value != 0) { return value; } value = getTitle().toLowerCase().compareTo(calEvent.getTitle() .toLowerCase()); ... |
String groupId = PortalUtil.getPortletGroupId(req); | String groupId = ParamUtil.getString(req, "groupId"); | public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { try { String cmd = ParamUtil.getString(req, Constants.CMD); ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); String companyId = them... |
Map tokens = JournalUtil.getTokens(themeDisplay); | Map tokens = JournalUtil.getTokens(groupId, themeDisplay); | public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { try { String cmd = ParamUtil.getString(req, Constants.CMD); ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); String companyId = them... |
String contextPath = CompanyPropsUtil.get( | String contextPath = PrefsPropsUtil.getString( | 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... |
CompanyPropsUtil.get( | PrefsPropsUtil.getString( | 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... |
themeTaglibDTD = getResourcePath("liferay-theme.tld"); utilTaglibDTD = getResourcePath("liferay-util.tld"); | themeTaglibDTD = DeployUtil.getResourcePath("liferay-theme.tld"); utilTaglibDTD = DeployUtil.getResourcePath("liferay-util.tld"); | public AutoThemeDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); themeTaglibDTD = getResourcePath("liferay-theme.tld"); utilTaglibDTD = getResourcePath("liferay-util.tld"); unpackWar = Omniadm... |
jars.add(getResourcePath("util-java.jar")); jars.add(getResourcePath("util-taglib.jar")); | jars.add(DeployUtil.getResourcePath("util-java.jar")); jars.add(DeployUtil.getResourcePath("util-taglib.jar")); | public AutoThemeDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); themeTaglibDTD = getResourcePath("liferay-theme.tld"); utilTaglibDTD = getResourcePath("liferay-util.tld"); unpackWar = Omniadm... |
setModified(true); | public void setAddressId(String addressId) { if (((addressId == null) && (_addressId != null)) || ((addressId != null) && (_addressId == null)) || ((addressId != null) && (_addressId != null) && !addressId.equals(_addressId))) { if (!XSS_ALLOW_ADDRESSID) { addressId = XSSUtil.strip(addressId); } _ad... | |
setModified(true); | public void setCity(String city) { if (((city == null) && (_city != null)) || ((city != null) && (_city == null)) || ((city != null) && (_city != null) && !city.equals(_city))) { if (!XSS_ALLOW_CITY) { city = XSSUtil.strip(city); } _city = city; setModified(true); } } | |
setModified(true); | public void setMailing(boolean mailing) { if (mailing != _mailing) { _mailing = mailing; setModified(true); } } | |
setModified(true); | public void setStreet1(String street1) { if (((street1 == null) && (_street1 != null)) || ((street1 != null) && (_street1 == null)) || ((street1 != null) && (_street1 != null) && !street1.equals(_street1))) { if (!XSS_ALLOW_STREET1) { street1 = XSSUtil.strip(street1); } _street1 = street1; setModi... | |
setModified(true); | public void setStreet2(String street2) { if (((street2 == null) && (_street2 != null)) || ((street2 != null) && (_street2 == null)) || ((street2 != null) && (_street2 != null) && !street2.equals(_street2))) { if (!XSS_ALLOW_STREET2) { street2 = XSSUtil.strip(street2); } _street2 = street2; setModi... | |
setModified(true); | public void setStreet3(String street3) { if (((street3 == null) && (_street3 != null)) || ((street3 != null) && (_street3 == null)) || ((street3 != null) && (_street3 != null) && !street3.equals(_street3))) { if (!XSS_ALLOW_STREET3) { street3 = XSSUtil.strip(street3); } _street3 = street3; setModi... | |
setModified(true); | public void setZip(String zip) { if (((zip == null) && (_zip != null)) || ((zip != null) && (_zip == null)) || ((zip != null) && (_zip != null) && !zip.equals(_zip))) { if (!XSS_ALLOW_ZIP) { zip = XSSUtil.strip(zip); } _zip = zip; setModified(true); } } | |
AddressLocalServiceUtil.deleteAll( | AddressLocalServiceUtil.deleteAddresses( | 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"... |
sb.append(_readSQL("../sql/portal/portal-sybase.sql", _SYBASE[0], "\n")); | sb.append(FileUtil.read("../sql/portal/portal-sybase.sql")); sb.append("\n\n"); sb.append(FileUtil.read("../sql/indexes.sql")); sb.append("\n\n"); sb.append(FileUtil.read("../sql/sequences.sql")); | private void _buildCreate() throws IOException { // DB2 File file = new File("../sql/create/create-db2.sql"); StringBuffer sb = new StringBuffer(); sb.append("drop database lportal\n"); sb.append("create database lportal\n"); sb.append("connect to lportal\n"); sb.append(_readSQL("../sql/portal/portal-db2.sql", ... |
sybase = StringUtil.replace(sybase, ");\n", ")\ngo\n"); sybase = StringUtil.replace( sybase, new String[] {"\\\\", "\\'", "\\\"", "\\n", "\\r"}, new String[] {"\\", "''", "\"", "\n", "\r"}); | private void _buildSQL(String fileName) throws IOException { File file = new File("../sql/" + fileName + ".sql"); if (!file.exists()) { return; } // DB2 String db2 = _buildTemplate(fileName, _DB2, "db2"); db2 = _rewordDb2(db2); db2 = _removeLongInserts(db2); db2 = _removeNull(db2); db2 = StringUtil.replace(... | |
account.setUserId(StringPool.BLANK); | account.setUserId(User.getDefaultUserId(companyId)); | public Company updateCompany( String companyId, String portalURL, String homeURL, String mx, String name, String legalName, String legalId, String legalType, String sicCode, String tickerSymbol, String industry, String type, String size) throws PortalException, SystemException { // Company Date now = new Da... |
if (contentType.startsWith(Constants.MULTIPART_ALTERNATE)) { | if (contentType.startsWith(Constants.MULTIPART_ALTERNATIVE)) { | private static MailMessage _getContent( Part part, MailMessage mm, String contentPath) throws ContentException { try { String contentType = part.getContentType().toLowerCase(); if (part.getContent() instanceof Multipart) { Multipart mp = (Multipart)part.getContent(); if (contentType.startsWit... |
if (part.isMimeType(Constants.TEXT_PLAIN)) { | String subcontent = mpbp.getContentType().toLowerCase(); if (subcontent.startsWith(Constants.TEXT_PLAIN)) { | private static MailMessage _getContent( Part part, MailMessage mm, String contentPath) throws ContentException { try { String contentType = part.getContentType().toLowerCase(); if (part.getContent() instanceof Multipart) { Multipart mp = (Multipart)part.getContent(); if (contentType.startsWit... |
else if (part.isMimeType(Constants.TEXT_HTML)) { | else if (subcontent.startsWith(Constants.TEXT_HTML)) { | private static MailMessage _getContent( Part part, MailMessage mm, String contentPath) throws ContentException { try { String contentType = part.getContentType().toLowerCase(); if (part.getContent() instanceof Multipart) { Multipart mp = (Multipart)part.getContent(); if (contentType.startsWit... |
if (Validator.isNotNull(mm.getPlainBody())) { he.setMsg(mm.getPlainBody()); } | public static void completeMessage( HttpSession ses, MailMessage mm, boolean send, long draftId) throws ContentException, ContentPathException, FolderException, StoreException { try { String userId = (String)ses.getAttribute(WebKeys.USER_ID); String password = (String)ses.getAttribute(WebKeys.USER_PASSWORD)... | |
_createProps(content, "ar"); | public LangBuilder() { try { String content = _orderProps( new File(_LANG_DIR + "Language.properties")); _createProps(content, "zh_CN"); // Chinese (China) _createProps(content, "zh_TW"); // Chinese (Taiwan) _createProps(content, "cs"); // Czech _createProps(content, "nl"); // Dutch _createProps(conten... | |
if (translationId.equals("en_cs") || | if (translationId.equals("en_ar") || translationId.equals("en_cs") || | private String _translate(String translationId, String fromText) { if (translationId.equals("en_cs") || translationId.equals("en_hu") || translationId.equals("en_ru") || translationId.equals("en_tr") || translationId.equals("en_vi")) { // Automatic translator does not support Czech, Hungarian, Russian, //... |
setModified(true); | public void setEntryId(String entryId) { if (((entryId == null) && (_entryId != null)) || ((entryId != null) && (_entryId == null)) || ((entryId != null) && (_entryId != null) && !entryId.equals(_entryId))) { if (!XSS_ALLOW_ENTRYID) { entryId = XSSUtil.strip(entryId); } _entryId = entryId; setModi... | |
articleId, version, incrementVersion, title, content, type, structureId, templateId, displayDateMonth, displayDateDay, | companyId, articleId, version, incrementVersion, title, content, type, structureId, templateId, displayDateMonth, displayDateDay, | 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... |
if (mailReceipt.isNew() || mailReceipt.isModified()) { session = openSession(); if (mailReceipt.isNew()) { MailReceipt mailReceiptModel = new MailReceipt(); mailReceiptModel.setReceiptId(mailReceipt.getReceiptId()); mailReceiptModel.setCompanyId(mailReceipt.getCompanyId()); mailReceiptModel.setUserId(mailReceipt.getUs... | session = openSession(); session.saveOrUpdate(mailReceipt); session.flush(); mailReceipt.setNew(false); | public com.liferay.portlet.mail.model.MailReceipt update( com.liferay.portlet.mail.model.MailReceipt mailReceipt) throws SystemException { Session session = null; try { if (mailReceipt.isNew() || mailReceipt.isModified()) { session = openSession(); if (mailReceipt.isNew()) { MailReceipt mailReceiptMode... |
sendRedirect(req, res); | if (Validator.isNotNull(cmd)) { sendRedirect(req, res); } | public void processAction( ActionMapping mapping, ActionForm form, PortletConfig config, ActionRequest req, ActionResponse res) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); try { if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) { updateQuestion(req); } else if ... |
_log.error(e.getMessage()); _log.warn(StackTraceUtil.getStackTrace(e)); | _log.error(StackTraceUtil.getStackTrace(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... |
if (resource.isNew() || resource.isModified()) { session = openSession(); if (resource.isNew()) { Resource resourceModel = new Resource(); resourceModel.setResourceId(resource.getResourceId()); resourceModel.setCompanyId(resource.getCompanyId()); resourceModel.setName(resource.getName()); resourceModel.setTypeId(resou... | session = openSession(); session.saveOrUpdate(resource); session.flush(); resource.setNew(false); | public com.liferay.portal.model.Resource update( com.liferay.portal.model.Resource resource) throws SystemException { Session session = null; try { if (resource.isNew() || resource.isModified()) { session = openSession(); if (resource.isNew()) { Resource resourceModel = new Resource(); resourceModel... |
ExportAction.DEFAULT_CMS_GROUP_ID, 0, 1); | ExportAction.DEFAULT_CMS_GROUP_ID, 0, 5); | private void _fixNewLine() throws PortalException, SystemException { // This is a workaround for a limitation in Oracle sqlldr's inability // insert new line characters for long varchar columns. See // http://forums.liferay.com/index.php?showtopic=2761&hl=oracle for more // information. boolean checkNewLine = fal... |
if (articles.size() == 1) { JournalArticle article = (JournalArticle)articles.get(0); | for (int i = 0; i < articles.size(); i++) { JournalArticle article = (JournalArticle)articles.get(i); | private void _fixNewLine() throws PortalException, SystemException { // This is a workaround for a limitation in Oracle sqlldr's inability // insert new line characters for long varchar columns. See // http://forums.liferay.com/index.php?showtopic=2761&hl=oracle for more // information. boolean checkNewLine = fal... |
for (int i = 0; i < articles.size(); i++) { article = (JournalArticle)articles.get(i); | for (int j = 0; j < articles.size(); j++) { article = (JournalArticle)articles.get(j); | private void _fixNewLine() throws PortalException, SystemException { // This is a workaround for a limitation in Oracle sqlldr's inability // insert new line characters for long varchar columns. See // http://forums.liferay.com/index.php?showtopic=2761&hl=oracle for more // information. boolean checkNewLine = fal... |
break; | private void _fixNewLine() throws PortalException, SystemException { // This is a workaround for a limitation in Oracle sqlldr's inability // insert new line characters for long varchar columns. See // http://forums.liferay.com/index.php?showtopic=2761&hl=oracle for more // information. boolean checkNewLine = fal... | |
UserServiceUtil.addGroupUsers(groupId, addUserIds); UserServiceUtil.unsetGroupUsers(groupId, removeUserIds); | if (addUserIds.length > 0) { UserServiceUtil.addGroupUsers(groupId, addUserIds); } if (removeUserIds.length > 0) { UserServiceUtil.unsetGroupUsers(groupId, removeUserIds); } | protected void updateGroupUsers(ActionRequest req) throws Exception { String groupId = ParamUtil.getString(req, "groupId"); String[] addUserIds = StringUtil.split( ParamUtil.getString(req, "addUserIds")); String[] removeUserIds = StringUtil.split( ParamUtil.getString(req, "removeUserIds")); UserServiceUtil.add... |
String companyId, String className, String classPK, String name, | String userId, String className, String classPK, String name, | public Group addGroup( String companyId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, companyId, name); } validateFriendlyURL(null, companyId, friendlyURL); Stri... |
validateName(null, companyId, name); | validateName(null, user.getCompanyId(), name); | public Group addGroup( String companyId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, companyId, name); } validateFriendlyURL(null, companyId, friendlyURL); Stri... |
validateFriendlyURL(null, companyId, friendlyURL); | validateFriendlyURL(null, user.getCompanyId(), friendlyURL); | public Group addGroup( String companyId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, companyId, name); } validateFriendlyURL(null, companyId, friendlyURL); Stri... |
group.setCompanyId(companyId); | group.setCompanyId(user.getCompanyId()); | public Group addGroup( String companyId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, companyId, name); } validateFriendlyURL(null, companyId, friendlyURL); Stri... |
LayoutSetLocalServiceUtil.addLayoutSet( Layout.PRIVATE + groupId, companyId); | public Group addGroup( String companyId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, companyId, name); } validateFriendlyURL(null, companyId, friendlyURL); Stri... | |
Layout.PUBLIC + groupId, companyId); | Layout.PRIVATE + groupId, user.getCompanyId()); LayoutSetLocalServiceUtil.addLayoutSet( Layout.PUBLIC + groupId, user.getCompanyId()); if (Validator.isNull(className) && Validator.isNull(classPK)) { Role role = RoleLocalServiceUtil.addRole( user.getCompanyId(), "GROUP_" + groupId + "_ADMINISTRATOR", Group.class.ge... | public Group addGroup( String companyId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, companyId, name); } validateFriendlyURL(null, companyId, friendlyURL); Stri... |
try { Role role = RoleLocalServiceUtil.getGroupRole( group.getCompanyId(), groupId); RoleLocalServiceUtil.deleteRole(role.getRoleId()); } catch (NoSuchRoleException nsre) { } | public void deleteGroup(String groupId) throws PortalException, SystemException { Group group = GroupUtil.findByPrimaryKey(groupId); if (PortalUtil.isSystemGroup(group.getName())) { throw new RequiredGroupException(); } // Layout sets LayoutSetLocalServiceUtil.deleteLayoutSet(Layout.PRIVATE + groupId); Layout... | |
if (shoppingOrder.isNew() || shoppingOrder.isModified()) { session = openSession(); if (shoppingOrder.isNew()) { ShoppingOrder shoppingOrderModel = new ShoppingOrder(); shoppingOrderModel.setOrderId(shoppingOrder.getOrderId()); shoppingOrderModel.setGroupId(shoppingOrder.getGroupId()); shoppingOrderModel.setCompanyId(... | session = openSession(); session.saveOrUpdate(shoppingOrder); session.flush(); shoppingOrder.setNew(false); | public com.liferay.portlet.shopping.model.ShoppingOrder update( com.liferay.portlet.shopping.model.ShoppingOrder shoppingOrder) throws SystemException { Session session = null; try { if (shoppingOrder.isNew() || shoppingOrder.isModified()) { session = openSession(); if (shoppingOrder.isNew()) { Shoppin... |
throws com.liferay.portal.SystemException { | throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { | public static java.util.List getOrgLabors(HttpPrincipal httpPrincipal, java.lang.String organizationId) throws com.liferay.portal.SystemException { try { Object paramObj0 = organizationId; if (organizationId == null) { paramObj0 = new NullWrapper("java.lang.String"); } MethodWrapper methodWrapper = new M... |
} catch (com.liferay.portal.PortalException pe) { _log.error(StackTraceUtil.getStackTrace(pe)); throw pe; | public static java.util.List getOrgLabors(HttpPrincipal httpPrincipal, java.lang.String organizationId) throws com.liferay.portal.SystemException { try { Object paramObj0 = organizationId; if (organizationId == null) { paramObj0 = new NullWrapper("java.lang.String"); } MethodWrapper methodWrapper = new M... | |
setModified(true); | public void setRegionCode(String regionCode) { if (((regionCode == null) && (_regionCode != null)) || ((regionCode != null) && (_regionCode == null)) || ((regionCode != null) && (_regionCode != null) && !regionCode.equals(_regionCode))) { if (!XSS_ALLOW_REGIONCODE) { regionCode = XSSUtil.strip(regionCod... | |
public static void addRosterEntry( | public static JSONObject addRosterEntry( | public static void addRosterEntry( HttpSession ses, String companyId, String emailAddress) throws PortalException, SystemException, XMPPException { Roster roster = getRoster(ses); User user = UserLocalServiceUtil.getUserByEmailAddress( companyId, emailAddress); String smackId = getXmppId(user); String name = ... |
JSONObject jo = new JSONObject(); | public static void addRosterEntry( HttpSession ses, String companyId, String emailAddress) throws PortalException, SystemException, XMPPException { Roster roster = getRoster(ses); User user = UserLocalServiceUtil.getUserByEmailAddress( companyId, emailAddress); String smackId = getXmppId(user); String name = ... | |
jo.put("name", name); jo.put("user", smackId); jo.put("status", "success"); return jo; | public static void addRosterEntry( HttpSession ses, String companyId, String emailAddress) throws PortalException, SystemException, XMPPException { Roster roster = getRoster(ses); User user = UserLocalServiceUtil.getUserByEmailAddress( companyId, emailAddress); String smackId = getXmppId(user); String name = ... | |
roster.setSubscriptionMode(Roster.SUBSCRIPTION_ACCEPT_ALL); | public static void createXMPPConnection(HttpSession ses, String userId) throws XMPPException { if (isJabberEnabled()) { XMPPConnection con = null; try { con = new XMPPConnection(SERVER_ADDRESS, SERVER_PORT); } catch (XMPPException e) { return; } try { con.login(userId, USER_PASSWORD, ses.getId()... | |
if (bookmarksEntry.isNew() || bookmarksEntry.isModified()) { session = openSession(); if (bookmarksEntry.isNew()) { BookmarksEntry bookmarksEntryModel = new BookmarksEntry(); bookmarksEntryModel.setEntryId(bookmarksEntry.getEntryId()); bookmarksEntryModel.setCompanyId(bookmarksEntry.getCompanyId()); bookmarksEntryMode... | session = openSession(); session.saveOrUpdate(bookmarksEntry); session.flush(); bookmarksEntry.setNew(false); | public com.liferay.portlet.bookmarks.model.BookmarksEntry update( com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry) throws SystemException { Session session = null; try { if (bookmarksEntry.isNew() || bookmarksEntry.isModified()) { session = openSession(); if (bookmarksEntry.isNew()) { ... |
if (ServerDetector.isJBoss()) { | if (ServerDetector.isGeronimo()) { sd._serverId = "geronimo"; } else if (ServerDetector.isJBoss()) { | public static String getServerId() { ServerDetector sd = _instance; if (sd._serverId == null) { if (ServerDetector.isJBoss()) { sd._serverId = "jboss"; } else if (ServerDetector.isJOnAS()) { sd._serverId = "jonas"; } else if (ServerDetector.isOC4J()) { sd._serverId = "oc4j"; } else if (ServerD... |
_log.error(ioe.getMessage()); | _log.error(ioe); | public JournalArticle approveArticle( String userId, String articleId, double version, String articleURL, PortletPreferences prefs) throws PortalException, SystemException { // Article User user = UserUtil.findByPrimaryKey(userId); Date now = new Date(); JournalArticlePK pk = new JournalArticlePK( user.getC... |
SAXReader reader = new SAXReader(); Document doc = reader.read(new StringReader(content)); | doc = reader.read(new StringReader(content)); | protected String format( String articleId, double version, boolean incrementVersion, String companyId, String content, String structureId, Map images) { if (Validator.isNotNull(structureId)) { try { SAXReader reader = new SAXReader(); Document doc = reader.read(new StringReader(content)); Element root = ... |
de.printStackTrace(); | _log.error(de); | protected String format( String articleId, double version, boolean incrementVersion, String companyId, String content, String structureId, Map images) { if (Validator.isNotNull(structureId)) { try { SAXReader reader = new SAXReader(); Document doc = reader.read(new StringReader(content)); Element root = ... |
ioe.printStackTrace(); | _log.error(ioe); | protected String format( String articleId, double version, boolean incrementVersion, String companyId, String content, String structureId, Map images) { if (Validator.isNotNull(structureId)) { try { SAXReader reader = new SAXReader(); Document doc = reader.read(new StringReader(content)); Element root = ... |
_log.error(e1.getMessage()); | _log.error(e1); | public void reIndex(String[] ids) throws SystemException { try { String companyId = ids[0]; Iterator itr = JournalArticleUtil.findByCompanyId( companyId).iterator(); while (itr.hasNext()) { JournalArticle article = (JournalArticle)itr.next(); String groupId = article.getGroupId(); String articleId =... |
_log.error(ioe.getMessage()); | _log.error(ioe); | public JournalArticle updateArticle( String userId, String articleId, double version, boolean incrementVersion, String title, String content, String type, String structureId, String templateId, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expi... |
if (dlFileVersion.isNew() || dlFileVersion.isModified()) { session = openSession(); if (dlFileVersion.isNew()) { DLFileVersion dlFileVersionModel = new DLFileVersion(); dlFileVersionModel.setFolderId(dlFileVersion.getFolderId()); dlFileVersionModel.setName(dlFileVersion.getName()); dlFileVersionModel.setVersion(dlFile... | session = openSession(); session.saveOrUpdate(dlFileVersion); session.flush(); dlFileVersion.setNew(false); | public com.liferay.portlet.documentlibrary.model.DLFileVersion update( com.liferay.portlet.documentlibrary.model.DLFileVersion dlFileVersion) throws SystemException { Session session = null; try { if (dlFileVersion.isNew() || dlFileVersion.isModified()) { session = openSession(); if (dlFileVersion.isNew())... |
setModified(true); | public void setCreatedByUserId(String createdByUserId) { if (((createdByUserId == null) && (_createdByUserId != null)) || ((createdByUserId != null) && (_createdByUserId == null)) || ((createdByUserId != null) && (_createdByUserId != null) && !createdByUserId.equals(_createdByUserId))) { if (!XSS_ALLOW_CRE... | |
setModified(true); | public void setCreatedByUserName(String createdByUserName) { if (((createdByUserName == null) && (_createdByUserName != null)) || ((createdByUserName != null) && (_createdByUserName == null)) || ((createdByUserName != null) && (_createdByUserName != null) && !createdByUserName.equals(_createdByUserName))) { ... | |
setModified(true); | public void setCreatedOn(Date createdOn) { if (((createdOn == null) && (_createdOn != null)) || ((createdOn != null) && (_createdOn == null)) || ((createdOn != null) && (_createdOn != null) && !createdOn.equals(_createdOn))) { _createdOn = createdOn; setModified(true); } } | |
setModified(true); | public void setDataTrackerId(String dataTrackerId) { if (((dataTrackerId == null) && (_dataTrackerId != null)) || ((dataTrackerId != null) && (_dataTrackerId == null)) || ((dataTrackerId != null) && (_dataTrackerId != null) && !dataTrackerId.equals(_dataTrackerId))) { if (!XSS_ALLOW_DATATRACKERID) { dat... | |
setModified(true); | public void setUpdatedBy(String updatedBy) { if (((updatedBy == null) && (_updatedBy != null)) || ((updatedBy != null) && (_updatedBy == null)) || ((updatedBy != null) && (_updatedBy != null) && !updatedBy.equals(_updatedBy))) { if (!XSS_ALLOW_UPDATEDBY) { updatedBy = XSSUtil.strip(updatedBy); } _up... | |
setModified(true); | public void setUpdatedOn(Date updatedOn) { if (((updatedOn == null) && (_updatedOn != null)) || ((updatedOn != null) && (_updatedOn == null)) || ((updatedOn != null) && (_updatedOn != null) && !updatedOn.equals(_updatedOn))) { _updatedOn = updatedOn; setModified(true); } } | |
public void init(ServletConfig sc) throws ServletException { | public void init(ServletConfig config) throws ServletException { | public void init(ServletConfig sc) throws ServletException { synchronized (LuceneServlet.class) { super.init(sc); ServletContext ctx = getServletContext(); _companyId = ctx.getInitParameter("company_id"); if (GetterUtil.getBoolean( PropsUtil.get(PropsUtil.INDEX_ON_STARTUP))) { _indexer = new LuceneInde... |
super.init(sc); | super.init(config); | public void init(ServletConfig sc) throws ServletException { synchronized (LuceneServlet.class) { super.init(sc); ServletContext ctx = getServletContext(); _companyId = ctx.getInitParameter("company_id"); if (GetterUtil.getBoolean( PropsUtil.get(PropsUtil.INDEX_ON_STARTUP))) { _indexer = new LuceneInde... |
{ | public static < K, V > List< Map.Entry< K, V > > entries( final List< K > keys, final List< V > values ) { if( keys == null || keys.size() == 0 ) return ListUtil.list(); final List< Map.Entry< K, V > > entries = ListUtil.list()... | |
continue; } | public static < K, V > List< Map.Entry< K, V > > entries( final List< K > keys, final List< V > values ) { if( keys == null || keys.size() == 0 ) return ListUtil.list(); final List< Map.Entry< K, V > > entries = ListUtil.list()... | |
text = StringUtil.replace(text, "**", "*"); text = StringUtil.replace(text, "*~", "*"); text = StringUtil.replace(text, "~~", "~"); text = StringUtil.replace(text, "~*", "~"); | public static void addTerm( BooleanQuery booleanQuery, String field, String text) throws ParseException { if (Validator.isNotNull(text)) { Matcher matcher = TERM_END_PATTERN.matcher(text); // Add wildcard to the end of every word text = matcher.replaceAll("$1*"); // Add fuzzy query to the end of every word... | |
String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); | protected void deleteArticles(ActionRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "... | |
if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "articleURL"); | String[] deleteArticleIds = StringUtil.split( ParamUtil.getString(req, "deleteArticleIds")); for (int i = 0; i < deleteArticleIds.length; i++) { int pos = deleteArticleIds[i].lastIndexOf(VERSION_SEPARATOR); String articleId = deleteArticleIds[i].substring(0, pos); double version = GetterUtil.getDouble( deleteArticleI... | protected void deleteArticles(ActionRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "... |
companyId, articleId, version, articleURL, req.getPreferences()); | companyId, articleId, version, null, null); | protected void deleteArticles(ActionRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "... |
JournalUtil.removeRecentArticle(req, articleId); } else { String[] deleteArticleIds = StringUtil.split( ParamUtil.getString(req, "deleteArticleIds")); for (int i = 0; i < deleteArticleIds.length; i++) { int pos = deleteArticleIds[i].lastIndexOf(VERSION_SEPARATOR); articleId = deleteArticleIds[i].substring(0, pos); ve... | JournalUtil.removeRecentArticle(req, deleteArticleIds[i]); | protected void deleteArticles(ActionRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "... |
String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); | protected void expireArticles(ActionRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "... | |
if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "articleURL"); | String[] expireArticleIds = StringUtil.split( ParamUtil.getString(req, "expireArticleIds")); for (int i = 0; i < expireArticleIds.length; i++) { int pos = expireArticleIds[i].lastIndexOf(VERSION_SEPARATOR); String articleId = expireArticleIds[i].substring(0, pos); double version = GetterUtil.getDouble( expireArticleI... | protected void expireArticles(ActionRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "... |
companyId, articleId, version, articleURL, req.getPreferences()); } else { String[] expireArticleIds = StringUtil.split( ParamUtil.getString(req, "expireArticleIds")); for (int i = 0; i < expireArticleIds.length; i++) { int pos = expireArticleIds[i].lastIndexOf(VERSION_SEPARATOR); articleId = expireArticleIds[i].subs... | companyId, articleId, version, null, null); | protected void expireArticles(ActionRequest req) throws Exception { String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); double version = ParamUtil.getDouble(req, "version"); if (Validator.isNotNull(articleId)) { String articleURL = ParamUtil.getString(req, "... |
return model(mailReceiptHBM, true); | return (com.liferay.portlet.mail.model.MailReceipt)mailReceiptHBM; | public static com.liferay.portlet.mail.model.MailReceipt model( MailReceiptHBM mailReceiptHBM) { return model(mailReceiptHBM, true); } |
Portlet portlet = PortletServiceUtil.getPortletById(companyId, name); | if (name.equals(PortletKeys.PORTAL_CONFIGURATION)) { actions.add(ActionKeys.ADD_COMMUNITY); actions.add(ActionKeys.ADD_ORGANIZATION); actions.add(ActionKeys.ADD_ROLE); } else { Portlet portlet = PortletServiceUtil.getPortletById(companyId, name); | private List _getPortletResourceActions(String companyId, String name) throws SystemException { List actions = _getActions(_portletResourceActions, name); if (actions.size() == 0) { synchronized (this) { actions.clear(); Portlet portlet = PortletServiceUtil.getPortletById(companyId, name); Map portle... |
if (actionId.equalsIgnoreCase("edit")) { actions.add(ActionKeys.PREFERENCES); } else { actions.add(actionId.toUpperCase()); | if (actionId.equalsIgnoreCase("edit")) { actions.add(ActionKeys.PREFERENCES); } else { actions.add(actionId.toUpperCase()); } | private List _getPortletResourceActions(String companyId, String name) throws SystemException { List actions = _getActions(_portletResourceActions, name); if (actions.size() == 0) { synchronized (this) { actions.clear(); Portlet portlet = PortletServiceUtil.getPortletById(companyId, name); Map portle... |
_checkPortletActions(actions); List communityDefaultActions = _getActions(_portletResourceCommunityDefaultActions, name); communityDefaultActions.clear(); _checkPortletCommunityDefaultActions(communityDefaultActions); | private List _getPortletResourceActions(String companyId, String name) throws SystemException { List actions = _getActions(_portletResourceActions, name); if (actions.size() == 0) { synchronized (this) { actions.clear(); Portlet portlet = PortletServiceUtil.getPortletById(companyId, name); Map portle... | |
return portletCtxImpl.getServletContext(); | return getServletContext(portletCtxImpl.getServletContext()); | public ServletContext getServletContext(GenericPortlet portlet) { PortletContextImpl portletCtxImpl = (PortletContextImpl)portlet.getPortletContext(); return portletCtxImpl.getServletContext(); } |
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 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 { return getService().updateFileEntry(folderId, name... |
return getService().updateFileEntry(folderId, name, title, description); | return getService().updateFileEntry(userId, folderId, newFolderId, name, sourceFileName, title, description, byteArray); | public 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 { return getService().updateFileEntry(folderId, name... |
setModified(true); | public void setLastVoteDate(Date lastVoteDate) { if (((lastVoteDate == null) && (_lastVoteDate != null)) || ((lastVoteDate != null) && (_lastVoteDate == null)) || ((lastVoteDate != null) && (_lastVoteDate != null) && !lastVoteDate.equals(_lastVoteDate))) { _lastVoteDate = lastVoteDate; setModified(true);... | |
_listeners = new ArrayList(); | _listeners = new Vector(); _events = new Vector(); | private HotDeployUtil() { _listeners = new ArrayList(); } |
if (_events != null) { _events.add(event); return; } | private void _fireDeployEvent(HotDeployEvent event) { Iterator itr = _listeners.iterator(); while (itr.hasNext()) { HotDeployListener listener = (HotDeployListener)itr.next(); try { listener.invokeDeploy(event); } catch (HotDeployException hde) { _log.error(StackTraceUtil.getStackTrace(hde)); } } } | |
if (mbStatsUser.isNew() || mbStatsUser.isModified()) { session = openSession(); if (mbStatsUser.isNew()) { MBStatsUser mbStatsUserModel = new MBStatsUser(); mbStatsUserModel.setGroupId(mbStatsUser.getGroupId()); mbStatsUserModel.setUserId(mbStatsUser.getUserId()); mbStatsUserModel.setMessageCount(mbStatsUser.getMessag... | session = openSession(); session.saveOrUpdate(mbStatsUser); session.flush(); mbStatsUser.setNew(false); | public com.liferay.portlet.messageboards.model.MBStatsUser update( com.liferay.portlet.messageboards.model.MBStatsUser mbStatsUser) throws SystemException { Session session = null; try { if (mbStatsUser.isNew() || mbStatsUser.isModified()) { session = openSession(); if (mbStatsUser.isNew()) { MBStatsUs... |
else if (ServerDetector.isJetty()) { sd._serverId = "jetty"; | else if (ServerDetector.isJOnAS()) { sd._serverId = "jonas"; | public static String getServerId() { ServerDetector sd = _instance; if (sd._serverId == null) { if (ServerDetector.isJBoss()) { sd._serverId = "jboss"; } else if (ServerDetector.isJetty()) { sd._serverId = "jetty"; } else if (ServerDetector.isOC4J()) { sd._serverId = "oc4j"; } else if (ServerD... |
else if (ServerDetector.isTomcat()) { sd._serverId = "tomcat"; } | public static String getServerId() { ServerDetector sd = _instance; if (sd._serverId == null) { if (ServerDetector.isJBoss()) { sd._serverId = "jboss"; } else if (ServerDetector.isJetty()) { sd._serverId = "jetty"; } else if (ServerDetector.isOC4J()) { sd._serverId = "oc4j"; } else if (ServerD... | |
else { | else if (ServerDetector.isWebSphere()) { | public static String getServerId() { ServerDetector sd = _instance; if (sd._serverId == null) { if (ServerDetector.isJBoss()) { sd._serverId = "jboss"; } else if (ServerDetector.isJetty()) { sd._serverId = "jetty"; } else if (ServerDetector.isOC4J()) { sd._serverId = "oc4j"; } else if (ServerD... |
} if (ServerDetector.isJetty()) { if (sd._serverId == null) { sd._serverId = "jetty"; } else { sd._serverId += "-jetty"; } } else if (ServerDetector.isTomcat()) { if (sd._serverId == null) { sd._serverId = "tomcat"; } else { sd._serverId += "-tomcat"; } } _log.info("Detected server " + sd._serverId); if (sd._serverI... | public static String getServerId() { ServerDetector sd = _instance; if (sd._serverId == null) { if (ServerDetector.isJBoss()) { sd._serverId = "jboss"; } else if (ServerDetector.isJetty()) { sd._serverId = "jetty"; } else if (ServerDetector.isOC4J()) { sd._serverId = "oc4j"; } else if (ServerD... | |
public java.util.List getPermissions(java.lang.String[] actionIds, java.lang.String resourceId) | public java.util.List getPermissions(java.lang.String companyId, java.lang.String[] actionIds, java.lang.String resourceId) | public java.util.List getPermissions(java.lang.String[] actionIds, java.lang.String resourceId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().getPermissions(actionIds, resourceId); } |
return getService().getPermissions(actionIds, resourceId); | return getService().getPermissions(companyId, actionIds, resourceId); | public java.util.List getPermissions(java.lang.String[] actionIds, java.lang.String resourceId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { return getService().getPermissions(actionIds, resourceId); } |
if (msg1.getReceivedDate().before(msg2.getReceivedDate())) { return 1; } else if (msg1.getReceivedDate().after(msg2.getReceivedDate())) { return -1; } | return DateUtil.compareTo( msg1.getReceivedDate(), msg2.getReceivedDate()); | public int compare(Object obj1, Object obj2) { Message msg1 = (Message)obj1; Message msg2 = (Message)obj2; try { if (msg1.getReceivedDate().before(msg2.getReceivedDate())) { return 1; } else if (msg1.getReceivedDate().after(msg2.getReceivedDate())) { return -1; } } catch (MessagingException me) { ... |
setModified(true); | public void setUrl(String url) { if (((url == null) && (_url != null)) || ((url != null) && (_url == null)) || ((url != null) && (_url != null) && !url.equals(_url))) { if (!XSS_ALLOW_URL) { url = XSSUtil.strip(url); } _url = url; setModified(true); } } | |
setModified(true); | public void setWebsiteId(String websiteId) { if (((websiteId == null) && (_websiteId != null)) || ((websiteId != null) && (_websiteId == null)) || ((websiteId != null) && (_websiteId != null) && !websiteId.equals(_websiteId))) { if (!XSS_ALLOW_WEBSITEID) { websiteId = XSSUtil.strip(websiteId); } _we... | |
companyId, User.class.getName(), userId, null, null); | userId, User.class.getName(), userId, null, null); | private void _upgradeLayout() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { Set groupIds = new HashSet(); con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_LAYOUT_1); rs = ps.executeQuery(); while (rs.next()) { ... |
public static InternetAddress getAddress(String entry) throws Exception { | public static InternetAddress getAddress(String entry) throws AddressException, UnsupportedEncodingException { | public static InternetAddress getAddress(String entry) throws Exception { InternetAddress ia = new InternetAddress(); String [] parts = entry.split(StringPool.LESS_THAN); if (parts.length == 2) { String name = parts[0].trim(); if (name.endsWith(StringPool.QUOTE) || name.endsWith(StringPool.APOSTROPHE)) { ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.