rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Layout.GROUP + generalGuestGroup.getGroupId()); | Layout.PUBLIC + generalGuestGroup.getGroupId()); | public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { // Disable caching for CSS and JavaScript PropsUtil.set(PropsUtil.LAST_MODIFIED_CHECK, "false"); // Do not randomize layout unless the user is logged in ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribut... |
random.nextInt(layouts.size())); | Randomizer.getInstance().nextInt(layouts.size())); | public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { // Disable caching for CSS and JavaScript PropsUtil.set(PropsUtil.LAST_MODIFIED_CHECK, "false"); // Do not randomize layout unless the user is logged in ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribut... |
}*/ | } | public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { // Disable caching for CSS and JavaScript PropsUtil.set(PropsUtil.LAST_MODIFIED_CHECK, "false"); // Do not randomize layout unless the user is logged in ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribut... |
if (Validator.isNull(description)) { description = uploadReq.getFileName("file"); } | protected void updateImage(ActionRequest req) throws Exception { UploadPortletRequest uploadReq = PortalUtil.getUploadPortletRequest(req); String imageId = ParamUtil.getString(uploadReq, "imageId"); String folderId = ParamUtil.getString(uploadReq, "folderId"); String description = ParamUtil.getString(uploadReq, ... | |
if (portlet.isNew() || portlet.isModified()) { session = openSession(); if (portlet.isNew()) { Portlet portletModel = new Portlet(); portletModel.setPortletId(portlet.getPortletId()); portletModel.setCompanyId(portlet.getCompanyId()); portletModel.setNarrow(portlet.getNarrow()); portletModel.setRoles(portlet.getRoles(... | session = openSession(); session.saveOrUpdate(portlet); session.flush(); portlet.setNew(false); | public com.liferay.portal.model.Portlet update( com.liferay.portal.model.Portlet portlet) throws SystemException { Session session = null; try { if (portlet.isNew() || portlet.isModified()) { session = openSession(); if (portlet.isNew()) { Portlet portletModel = new Portlet(); portletModel.setPortle... |
if (journalStructure.isNew() || journalStructure.isModified()) { session = openSession(); if (journalStructure.isNew()) { JournalStructure journalStructureModel = new JournalStructure(); journalStructureModel.setCompanyId(journalStructure.getCompanyId()); journalStructureModel.setStructureId(journalStructure.getStruct... | session = openSession(); session.saveOrUpdate(journalStructure); session.flush(); journalStructure.setNew(false); | public com.liferay.portlet.journal.model.JournalStructure update( com.liferay.portlet.journal.model.JournalStructure journalStructure) throws SystemException { Session session = null; try { if (journalStructure.isNew() || journalStructure.isModified()) { session = openSession(); if (journalStructure.isNew(... |
"/WEB-INF/liferay-portlet-ext.xml")) | "/WEB-INF/liferay-portlet-ext.xml")), Http.URLtoString(ctx.getResource("/WEB-INF/web.xml")) | public void init() throws ServletException { synchronized (MainServlet.class) { // Initialize if (_log.isDebugEnabled()) { _log.debug("Initialize"); } super.init(); // Process startup events if (_log.isDebugEnabled()) { _log.debug("Process startup events"); } try { EventsProcessor.process( ... |
if (region.isNew() || region.isModified()) { session = openSession(); if (region.isNew()) { Region regionModel = new Region(); regionModel.setRegionId(region.getRegionId()); regionModel.setCountryId(region.getCountryId()); regionModel.setRegionCode(region.getRegionCode()); regionModel.setName(region.getName()); region... | session = openSession(); session.saveOrUpdate(region); session.flush(); region.setNew(false); | public com.liferay.portal.model.Region update( com.liferay.portal.model.Region region) throws SystemException { Session session = null; try { if (region.isNew() || region.isModified()) { session = openSession(); if (region.isNew()) { Region regionModel = new Region(); regionModel.setRegionId(region.... |
if (dataTracker.isNew() || dataTracker.isModified()) { session = openSession(); if (dataTracker.isNew()) { DataTracker dataTrackerModel = new DataTracker(); dataTrackerModel.setDataTrackerId(dataTracker.getDataTrackerId()); dataTrackerModel.setCompanyId(dataTracker.getCompanyId()); dataTrackerModel.setCreatedOn(dataTr... | session = openSession(); session.saveOrUpdate(dataTracker); session.flush(); dataTracker.setNew(false); | public com.liferay.portal.model.DataTracker update( com.liferay.portal.model.DataTracker dataTracker) throws SystemException { Session session = null; try { if (dataTracker.isNew() || dataTracker.isModified()) { session = openSession(); if (dataTracker.isNew()) { DataTracker dataTrackerModel = new Data... |
if (journalTemplate.isNew() || journalTemplate.isModified()) { session = openSession(); if (journalTemplate.isNew()) { JournalTemplate journalTemplateModel = new JournalTemplate(); journalTemplateModel.setCompanyId(journalTemplate.getCompanyId()); journalTemplateModel.setTemplateId(journalTemplate.getTemplateId()); jo... | session = openSession(); session.saveOrUpdate(journalTemplate); session.flush(); journalTemplate.setNew(false); | public com.liferay.portlet.journal.model.JournalTemplate update( com.liferay.portlet.journal.model.JournalTemplate journalTemplate) throws SystemException { Session session = null; try { if (journalTemplate.isNew() || journalTemplate.isModified()) { session = openSession(); if (journalTemplate.isNew()) { ... |
PortletPreferences prefs = AdminUtil.getPreferences(companyId); | PortletPreferences prefs = PrefsPropsUtil.getPreferences(companyId); | public void checkCompany(String companyId) throws PortalException, SystemException { // Company String companyMx = companyId; Date now = new Date(); Company company = null; try { company = CompanyUtil.findByPrimaryKey(companyId); } catch (NoSuchCompanyException nsce) { String portalURL = "localhost"; Str... |
prefs.setValue("email-from-name", "Liferay Demo"); prefs.setValue("email-from-address", "test@liferay.net"); | prefs.setValue( PropsUtil.ADMIN_EMAIL_FROM_NAME, "Liferay Demo"); prefs.setValue( PropsUtil.ADMIN_EMAIL_FROM_ADDRESS, "test@liferay.net"); | public void checkCompany(String companyId) throws PortalException, SystemException { // Company String companyMx = companyId; Date now = new Date(); Company company = null; try { company = CompanyUtil.findByPrimaryKey(companyId); } catch (NoSuchCompanyException nsce) { String portalURL = "localhost"; Str... |
Properties propertiesObj = PropertiesLocalServiceUtil.getPortalProperties(companyId); | PortletPreferences prefs = PrefsPropsUtil.getPreferences(companyId); | public void updateSecurity( String companyId, String authType, boolean autoLogin, boolean strangers) throws PortalException, SystemException { Properties propertiesObj = PropertiesLocalServiceUtil.getPortalProperties(companyId); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_AUTH_TYPE, authType); pr... |
propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_AUTH_TYPE, authType); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_AUTO_LOGIN, Boolean.toString(autoLogin)); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_STRANGERS, Boolean.toString(strangers)); | try { prefs.setValue(PropsUtil.COMPANY_SECURITY_AUTH_TYPE, authType); prefs.setValue( PropsUtil.COMPANY_SECURITY_AUTO_LOGIN, Boolean.toString(autoLogin)); prefs.setValue( PropsUtil.COMPANY_SECURITY_STRANGERS, Boolean.toString(strangers)); | public void updateSecurity( String companyId, String authType, boolean autoLogin, boolean strangers) throws PortalException, SystemException { Properties propertiesObj = PropertiesLocalServiceUtil.getPortalProperties(companyId); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_AUTH_TYPE, authType); pr... |
PropertiesLocalServiceUtil.updatePortalProperties( companyId, propertiesObj); | prefs.store(); } catch (IOException ioe) { throw new SystemException(ioe); } catch (PortletException pe) { throw new SystemException(pe); } | public void updateSecurity( String companyId, String authType, boolean autoLogin, boolean strangers) throws PortalException, SystemException { Properties propertiesObj = PropertiesLocalServiceUtil.getPortalProperties(companyId); propertiesObj.setProperty( PropsUtil.COMPANY_SECURITY_AUTH_TYPE, authType); pr... |
public static Map getTokens(ThemeDisplay themeDisplay) { | public static Map getTokens(String groupId, ThemeDisplay themeDisplay) { | public static Map getTokens(ThemeDisplay themeDisplay) { Map tokens = CollectionFactory.getHashMap(); if (themeDisplay == null) { return tokens; } Company company = themeDisplay.getCompany(); tokens.put("company_id", themeDisplay.getCompanyId()); tokens.put("group_id", themeDisplay.getPortletGroupId()); ... |
tokens.put("group_id", themeDisplay.getPortletGroupId()); | tokens.put("group_id", groupId); | public static Map getTokens(ThemeDisplay themeDisplay) { Map tokens = CollectionFactory.getHashMap(); if (themeDisplay == null) { return tokens; } Company company = themeDisplay.getCompany(); tokens.put("company_id", themeDisplay.getCompanyId()); tokens.put("group_id", themeDisplay.getPortletGroupId()); ... |
public void init(ServletConfig sc) throws ServletException { | public void init(ServletConfig config) throws ServletException { | public void init(ServletConfig sc) throws ServletException { synchronized (FriendlyURLServlet.class) { super.init(sc); ServletContext ctx = getServletContext(); _companyId = ctx.getInitParameter("company_id"); _private = GetterUtil.getBoolean(sc.getInitParameter("private")); } } |
super.init(sc); | super.init(config); | public void init(ServletConfig sc) throws ServletException { synchronized (FriendlyURLServlet.class) { super.init(sc); ServletContext ctx = getServletContext(); _companyId = ctx.getInitParameter("company_id"); _private = GetterUtil.getBoolean(sc.getInitParameter("private")); } } |
_private = GetterUtil.getBoolean(sc.getInitParameter("private")); | _private = GetterUtil.getBoolean( config.getInitParameter("private")); | public void init(ServletConfig sc) throws ServletException { synchronized (FriendlyURLServlet.class) { super.init(sc); ServletContext ctx = getServletContext(); _companyId = ctx.getInitParameter("company_id"); _private = GetterUtil.getBoolean(sc.getInitParameter("private")); } } |
return _renderResponse.encodeURL(path); | if (_isAction == false) { RenderResponse res = (RenderResponse)_portletResponse; return res.encodeURL(path); } else { throw new UnsupportedOperationException(); } | public String encodeURL(String path) { return _renderResponse.encodeURL(path); } |
return _renderResponse.getBufferSize(); | if (_isAction == false) { RenderResponse res = (RenderResponse)_portletResponse; return res.getBufferSize(); } else { return 0; } | public int getBufferSize() { return _renderResponse.getBufferSize(); } |
return _renderResponse.getLocale(); | if (_isAction == false) { RenderResponse res = (RenderResponse)_portletResponse; return res.getLocale(); } else { return null; } | public Locale getLocale() { return _renderResponse.getLocale(); } |
return _renderResponse.isCommitted(); | if (_isAction == false) { RenderResponse res = (RenderResponse)_portletResponse; return res.isCommitted(); } else { return false; } | public boolean isCommitted() { return _renderResponse.isCommitted(); } |
public boolean hasReadFlag(String topicId, String messageId, String userId) | public boolean hasReadFlag(String messageId, String userId) | public boolean hasReadFlag(String topicId, String messageId, String userId) throws PortalException, SystemException { if (userId == null) { // Unauthenticated users do not have a record of read messages return true; } try { MBMessageFlagUtil.findByPrimaryKey( new MBMessageFlagPK(topicId, messageId, userId... |
MBMessageFlagUtil.findByPrimaryKey( new MBMessageFlagPK(topicId, messageId, userId)); | MBMessageFlagUtil.findByPrimaryKey(new MBMessageFlagPK( MBMessage.DEPRECATED_TOPIC_ID, messageId, userId)); | public boolean hasReadFlag(String topicId, String messageId, String userId) throws PortalException, SystemException { if (userId == null) { // Unauthenticated users do not have a record of read messages return true; } try { MBMessageFlagUtil.findByPrimaryKey( new MBMessageFlagPK(topicId, messageId, userId... |
changes[ 0 ] = new Boolean( false ); | changes[ 0 ] = Boolean.FALSE; | public void resourceChanged( final IResourceChangeEvent event ) { final Boolean changes[] = new Boolean[ 1 ]; changes[ 0 ] = new Boolean( false ); final IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() { private void foundAChange() { cha... |
changes[ 0 ] = new Boolean( true ); | changes[ 0 ] = Boolean.TRUE; | public void resourceChanged( final IResourceChangeEvent event ) { final Boolean changes[] = new Boolean[ 1 ]; changes[ 0 ] = new Boolean( false ); final IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() { private void foundAChange() { cha... |
changes[ 0 ] = new Boolean( true ); | changes[ 0 ] = Boolean.TRUE; | private void foundAChange() { changes[ 0 ] = new Boolean( true ); } |
public void addScript( final String name, final ScriptMetadata script ) | public static void addScript( final String name, final ScriptMetadata script ) | public void addScript( final String name, final ScriptMetadata script ) { final Map< String, ScriptMetadata > store = getScriptStore(); final ScriptMetadata oldScript = store.get( name ); if( oldScript != null ) oldScript.unsubscribe(); store.put(... |
final Map< String, ScriptMetadata > store = getScriptStore(); | final Map< String, ScriptMetadata > store = scriptStore(); | public void addScript( final String name, final ScriptMetadata script ) { final Map< String, ScriptMetadata > store = getScriptStore(); final ScriptMetadata oldScript = store.get( name ); if( oldScript != null ) oldScript.unsubscribe(); store.put(... |
public void clearScripts() | public static void clearScripts() | public void clearScripts() { getScriptStore().clear(); // TODO unsubscribe } |
getScriptStore().clear(); | final Set< String > keys = new LinkedHashSet< String >( scriptStore().keySet() ); for( final String key : keys ) removeScript( key ); scriptStore().clear(); | public void clearScripts() { getScriptStore().clear(); // TODO unsubscribe } |
public void removeScript( final String name ) | public static void removeScript( final String name ) | public void removeScript( final String name ) { final Map< String, ScriptMetadata > store = getScriptStore(); final ScriptMetadata oldScript = store.remove( name ); if( oldScript == null ) return; oldScript.unsubscribe(); } |
final Map< String, ScriptMetadata > store = getScriptStore(); | final Map< String, ScriptMetadata > store = scriptStore(); | public void removeScript( final String name ) { final Map< String, ScriptMetadata > store = getScriptStore(); final ScriptMetadata oldScript = store.remove( name ); if( oldScript == null ) return; oldScript.unsubscribe(); } |
if (false) { | if (true) { | public void test() throws Exception { LayoutServiceSoapServiceLocator locator = new LayoutServiceSoapServiceLocator(); // Unathenticated url String url = "http://localhost:8080/tunnel/axis/Portal_LayoutService"; // Authenticated url if (false) { String userId = "liferay.com.1"; String password = "test"; ... |
String password = "test"; | String password = "qUqP5cyxm6YcTAhz05Hph5gvu9M="; | public void test() throws Exception { LayoutServiceSoapServiceLocator locator = new LayoutServiceSoapServiceLocator(); // Unathenticated url String url = "http://localhost:8080/tunnel/axis/Portal_LayoutService"; // Authenticated url if (false) { String userId = "liferay.com.1"; String password = "test"; ... |
finally { try { writer.close(); } catch (IOException e) { e.printStackTrace(); } } | 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... | |
if (address.isNew() || address.isModified()) { session = openSession(); if (address.isNew()) { Address addressModel = new Address(); addressModel.setAddressId(address.getAddressId()); addressModel.setCompanyId(address.getCompanyId()); addressModel.setUserId(address.getUserId()); addressModel.setUserName(address.getUse... | session = openSession(); session.saveOrUpdate(address); session.flush(); address.setNew(false); | public com.liferay.portal.model.Address update( com.liferay.portal.model.Address address) throws SystemException { Session session = null; try { if (address.isNew() || address.isModified()) { session = openSession(); if (address.isNew()) { Address addressModel = new Address(); addressModel.setAddres... |
if (role.isNew() || role.isModified()) { session = openSession(); if (role.isNew()) { Role roleModel = new Role(); roleModel.setRoleId(role.getRoleId()); roleModel.setCompanyId(role.getCompanyId()); roleModel.setClassName(role.getClassName()); roleModel.setClassPK(role.getClassPK()); roleModel.setName(role.getName());... | session = openSession(); session.saveOrUpdate(role); session.flush(); role.setNew(false); | 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()) { Role roleModel = new Role(); roleModel.setRoleId(role.getRoleId()); roleMo... |
setAction( "publishForBlogger", new PublishScriptForBlogger( this ) ); setAction( "publishForEmail", new PublishScriptForEmail( this ) ); setAction( "publishForText", new PublishScriptForText( this ) ); setAction( "publishForWiki", new PublishScriptForWiki( this ) ); | protected void createActions() { super.createActions(); final Action action = new ContentAssistAction( getBundle( PLUGIN_ID + ".editor.messages" ), "ContentAssistProposal.", this ); action.setActionDefinitionId( CONTENT_ASSIST_PROPOSALS ); setAction( "ContentAssistProposal", action );... | |
final MenuManager publishMenu = new MenuManager( "Copy for Publication", "publish" ); menu.appendToGroup( GROUP_EDIT, publishMenu ); publishMenu.add( getAction( "publishForBlogger" ) ); publishMenu.add( getAction( "publishForEmail" ) ); publishMenu.add( getAction( "publishForText" ) ); publishMenu.add( getAction( "publ... | protected void editorContextMenuAboutToShow( final IMenuManager menu ) { super.editorContextMenuAboutToShow( menu ); menu.appendToGroup( GROUP_EDIT, new Separator( GROUP_EDIT ) ); menu.appendToGroup( GROUP_EDIT, getAction( "addBundle" ) ); menu.appendToGroup( GROUP_EDIT, getAction( "a... | |
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", _DB2[0], "\n")); | sb.append("drop database lportal;\n"); sb.append("create database lportal;\n"); sb.append("connect to lportal;\n"); sb.append(FileUtil.read("../sql/portal/portal-db2.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", ... |
sb.append(FileUtil.read("../sql/sequences.sql")); | sb.append(FileUtil.read("../sql/indexes/indexes-db2.sql")); sb.append("\n\n"); sb.append(FileUtil.read("../sql/sequences/sequences-db2.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", ... |
sb.append(FileUtil.read("../sql/indexes.sql")); | sb.append(FileUtil.read("../sql/indexes/indexes-mysql.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", ... |
sb.append(FileUtil.read("../sql/sequences.sql")); | sb.append(FileUtil.read("../sql/sequences/sequences-mysql.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", ... |
sb.append(FileUtil.read("../sql/indexes.sql")); | sb.append(FileUtil.read("../sql/indexes/indexes-oracle.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", ... |
sb.append(FileUtil.read("../sql/sequences.sql")); | sb.append(FileUtil.read("../sql/sequences/sequences-oracle.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", ... |
sb.append(FileUtil.read("../sql/indexes.sql")); | sb.append(FileUtil.read("../sql/indexes/indexes-postgresql.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", ... |
sb.append(FileUtil.read("../sql/sequences.sql")); | sb.append(FileUtil.read("../sql/sequences/sequences-postgresql.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", ... |
sb.append(FileUtil.read("../sql/indexes.sql")); | sb.append(FileUtil.read("../sql/indexes/indexes-sql-server.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", ... |
sb.append(FileUtil.read("../sql/sequences.sql")); | sb.append(FileUtil.read("../sql/sequences/sequences-sql-server.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", ... |
db2 = _removeLongInserts(db2); | 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(... | |
db2 = StringUtil.replace( db2, new String[] {"\\'"}, new String[] {"''"}); | db2 = StringUtil.replace(db2, "\\'", "''"); | 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(... |
mysql = StringUtil.replace( mysql, new String[] {"\\'"}, new String[] {"''"}); | mysql = StringUtil.replace(mysql, "\\'", "''"); | 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(... |
if (fileName.equals("indexes")) { sybase = _removeBooleanIndexes(sybase); } | sybase = _rewordSybase(sybase); | 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(... |
if (fileName.equals("indexes") && server.equals("sybase")) { template = _removeBooleanIndexes(template); } | private String _buildTemplate( String fileName, String[] replace, String server) throws IOException { File file = new File("../sql/" + fileName + ".sql"); String template = FileUtil.read(file); if (fileName.equals("portal") || fileName.equals("update-3.6.0-4.0.0")) { BufferedReader br = new BufferedReader(ne... | |
String categoryId, String topicId, String messageId, | String categoryId, String messageId, | public void addMessageResources( String categoryId, String topicId, String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws PortalException, SystemException { MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); MBMessage message = MBMessageUtil.findByPrimaryKey( n... |
new MBMessagePK(topicId, messageId)); | new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId)); | public void addMessageResources( String categoryId, String topicId, String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws PortalException, SystemException { MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); MBMessage message = MBMessageUtil.findByPrimaryKey( n... |
public void deleteDiscussionMessage(String topicId, String messageId) | public void deleteDiscussionMessage(String messageId) | public void deleteDiscussionMessage(String topicId, String messageId) throws PortalException, SystemException { deleteMessage(topicId, messageId); } |
deleteMessage(topicId, messageId); | deleteMessage(messageId); | public void deleteDiscussionMessage(String topicId, String messageId) throws PortalException, SystemException { deleteMessage(topicId, messageId); } |
deleteMessage(message.getTopicId(), message.getMessageId()); | deleteMessage(message.getMessageId()); | public void deleteDiscussionMessages(String className, String classPK) throws PortalException, SystemException { try { MBDiscussion discussion = MBDiscussionUtil.findByC_C(className, classPK); List messages = MBMessageUtil.findByT_P( discussion.getThreadId(), MBMessage.DEFAULT_PARENT_MESSAGE_ID); MBMessa... |
public void deleteMessage(String topicId, String messageId) | public void deleteMessage(String messageId) | public void deleteMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); deleteMessage(message); } |
new MBMessagePK(topicId, messageId)); | new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId)); | public void deleteMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); deleteMessage(message); } |
public MBMessage getMessage(String topicId, String messageId) | public MBMessage getMessage(String messageId) | public MBMessage getMessage(String topicId, String messageId) throws PortalException, SystemException { return MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); } |
new MBMessagePK(topicId, messageId)); | new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId)); | public MBMessage getMessage(String topicId, String messageId) throws PortalException, SystemException { return MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); } |
public MBMessageDisplay getMessageDisplay( String topicId, String messageId, String userId) | public MBMessageDisplay getMessageDisplay(String messageId, String userId) | public MBMessageDisplay getMessageDisplay( String topicId, String messageId, String userId) throws PortalException, SystemException { MBMessage message = getMessage(topicId, messageId); return getMessageDisplay(message, userId); } |
MBMessage message = getMessage(topicId, messageId); | MBMessage message = getMessage(messageId); | public MBMessageDisplay getMessageDisplay( String topicId, String messageId, String userId) throws PortalException, SystemException { MBMessage message = getMessage(topicId, messageId); return getMessageDisplay(message, userId); } |
public void subscribeMessage( String userId, String topicId, String messageId) | public void subscribeMessage(String userId, String messageId) | public void subscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.addSubscription( userId, MBThread.class.getName(), message.getThreadId... |
new MBMessagePK(topicId, messageId)); | new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId)); | public void subscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.addSubscription( userId, MBThread.class.getName(), message.getThreadId... |
public void unsubscribeMessage( String userId, String topicId, String messageId) | public void unsubscribeMessage(String userId, String messageId) | public void unsubscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.deleteSubscription( userId, MBThread.class.getName(), message.getThr... |
new MBMessagePK(topicId, messageId)); | new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId)); | public void unsubscribeMessage( String userId, String topicId, String messageId) throws PortalException, SystemException { MBMessage message = MBMessageUtil.findByPrimaryKey( new MBMessagePK(topicId, messageId)); SubscriptionLocalServiceUtil.deleteSubscription( userId, MBThread.class.getName(), message.getThr... |
String topicId, String messageId, String subject, String body) | String messageId, String subject, String body) | public MBMessage updateDiscussionMessage( String topicId, String messageId, String subject, String body) throws PortalException, SystemException { String categoryId = Company.SYSTEM; List files = new ArrayList(); PortletPreferences prefs = null; return updateMessage( topicId, messageId, categoryId, subject, b... |
topicId, messageId, categoryId, subject, body, files, prefs); | messageId, categoryId, subject, body, files, prefs); | public MBMessage updateDiscussionMessage( String topicId, String messageId, String subject, String body) throws PortalException, SystemException { String categoryId = Company.SYSTEM; List files = new ArrayList(); PortletPreferences prefs = null; return updateMessage( topicId, messageId, categoryId, subject, b... |
String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) | String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) | public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) throws PortalException, SystemException { // Message MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); Date now = new Date(); validate(subjec... |
new MBMessagePK(topicId, messageId)); | new MBMessagePK(MBMessage.DEPRECATED_TOPIC_ID, messageId)); | public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) throws PortalException, SystemException { // Message MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); Date now = new Date(); validate(subjec... |
category.getCategoryId(), message.getTopicId(), message.getThreadId(), messageId, subject, body); | category.getCategoryId(), message.getThreadId(), messageId, subject, body); | public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files, PortletPreferences prefs) throws PortalException, SystemException { // Message MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); Date now = new Date(); validate(subjec... |
File deployDir = new File(OmniadminUtil.getAutoDeployDeployDir()); File destDir = new File(OmniadminUtil.getAutoDeployDestDir()); long interval = OmniadminUtil.getAutoDeployInterval(); | File deployDir = new File( PrefsPropsUtil.getString(PropsUtil.AUTO_DEPLOY_DEPLOY_DIR)); File destDir = new File( PrefsPropsUtil.getString(PropsUtil.AUTO_DEPLOY_DEST_DIR)); long interval = PrefsPropsUtil.getLong( PropsUtil.AUTO_DEPLOY_INTERVAL); | 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); } // Portal initable PortalInitableUtil.flushInitables(); // Hot deploy _log.... |
Iterator itr = QueryUtil.iterate( q, HibernateUtil.getDialect(), begin, end); | Iterator itr = null; if (begin > 0 || end > 0) { itr = QueryUtil.iterate( q, HibernateUtil.getDialect(), begin, end); } else { itr = q.list().iterator(); } | public static List findByC_N_D( String companyId, String name, String description, Map params, int begin, int end) throws SystemException { name = StringUtil.lowerCase(name); description = StringUtil.lowerCase(description); String userId = (String)params.get("usersGroups"); Map params1 = params; Map params2 ... |
changes[ 0 ] = new Boolean( false ); | changes[ 0 ] = Boolean.FALSE; | public void resourceChanged( final IResourceChangeEvent event ) { final Boolean changes[] = new Boolean[ 1 ]; changes[ 0 ] = new Boolean( false ); final IFile[] changedFile = new IFile[ 1 ]; final IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() { private ... |
changes[ 0 ] = new Boolean( true ); | changes[ 0 ] = Boolean.TRUE; | public void resourceChanged( final IResourceChangeEvent event ) { final Boolean changes[] = new Boolean[ 1 ]; changes[ 0 ] = new Boolean( false ); final IFile[] changedFile = new IFile[ 1 ]; final IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() { private ... |
changes[ 0 ] = new Boolean( true ); | changes[ 0 ] = Boolean.TRUE; | private void found_a_change( final IFile file ) { changes[ 0 ] = new Boolean( true ); changedFile[ 0 ] = file; } |
public com.liferay.portal.model.User addUser(java.lang.String companyId, | public com.liferay.portal.model.User addUser( java.lang.String creatorUserId, java.lang.String companyId, | public com.liferay.portal.model.User addUser(java.lang.String companyId, boolean autoUserId, java.lang.String userId, boolean autoPassword, java.lang.String password1, java.lang.String password2, boolean passwordReset, java.lang.String emailAddress, java.util.Locale locale, java.lang.String firstName, java.lang.S... |
ABContact contact = | /*ABContact contact = | private void _validate( String firstName, String lastName, String emailAddress, ABContact curContact) throws PortalException, SystemException { if (Validator.isNull(firstName)) { throw new ContactFirstNameException(); } else if (Validator.isNull(lastName)) { throw new ContactLastNameException(); } else if ... |
} | }*/ | private void _validate( String firstName, String lastName, String emailAddress, ABContact curContact) throws PortalException, SystemException { if (Validator.isNull(firstName)) { throw new ContactFirstNameException(); } else if (Validator.isNull(lastName)) { throw new ContactLastNameException(); } else if ... |
public static void setABLists(java.lang.String pk, java.util.List lists) | public static void setABLists(java.lang.String pk, java.lang.String[] pks) | public static void setABLists(java.lang.String pk, java.util.List lists) throws com.liferay.portlet.addressbook.NoSuchContactException, com.liferay.portlet.addressbook.NoSuchListException, com.liferay.portal.SystemException { getPersistence().setABLists(pk, lists); } |
getPersistence().setABLists(pk, lists); | getPersistence().setABLists(pk, pks); | public static void setABLists(java.lang.String pk, java.util.List lists) throws com.liferay.portlet.addressbook.NoSuchContactException, com.liferay.portlet.addressbook.NoSuchListException, com.liferay.portal.SystemException { getPersistence().setABLists(pk, lists); } |
setModified(true); | public void setAccountId(String accountId) { if (((accountId == null) && (_accountId != null)) || ((accountId != null) && (_accountId == null)) || ((accountId != null) && (_accountId != null) && !accountId.equals(_accountId))) { if (!XSS_ALLOW_ACCOUNTID) { accountId = XSSUtil.strip(accountId); } _ac... | |
setModified(true); | public void setParentAccountId(String parentAccountId) { if (((parentAccountId == null) && (_parentAccountId != null)) || ((parentAccountId != null) && (_parentAccountId == null)) || ((parentAccountId != null) && (_parentAccountId != null) && !parentAccountId.equals(_parentAccountId))) { if (!XSS_ALLOW_PAR... | |
if( fileName.length() == 0 ) | if( isBlank( fileName ) ) | private void dialogChanged() { if( isBlank( getContainerName() ) ) { updateStatus( "File container must be specified" ); return; } final IResource container = getWorkspace().getRoot().getFolder( new Path( getContainerName() ) ); final String fileName = get... |
if( dotLoc != -1 ) | if( dotLoc == -1 ) | private void dialogChanged() { if( isBlank( getContainerName() ) ) { updateStatus( "File container must be specified" ); return; } final IResource container = getWorkspace().getRoot().getFolder( new Path( getContainerName() ) ); final String fileName = get... |
final String ext = fileName.substring( dotLoc + 1 ); if( !ext.equalsIgnoreCase( SCRIPT_SUFFIX ) ) { updateStatus( "File extension must be \"" + SCRIPT_SUFFIX + "\"" ); return; } | updateStatus( "File extension must be \"" + SCRIPT_SUFFIX + "\"" ); return; } final String ext = fileName.substring( dotLoc + 1 ); if( !ext.equalsIgnoreCase( SCRIPT_SUFFIX ) ) { updateStatus( "File extension must be \"" + SCRIPT_SUFFIX + "\"" ); return; | private void dialogChanged() { if( isBlank( getContainerName() ) ) { updateStatus( "File container must be specified" ); return; } final IResource container = getWorkspace().getRoot().getFolder( new Path( getContainerName() ) ); final String fileName = get... |
final String fileName = fileText.getText(); if( isBlank( fileName ) ) return fileName; if( fileName.endsWith( FILE_EXTENSION ) ) return fileName; if( fileName.indexOf( "." ) != -1 && !fileName.endsWith( FILE_EXTENSION ) ) return substringBeforeLast( fileName, "." ) + FILE_EXTENSION; return fileName + FILE_EXTENSION; | return fileText.getText(); | public String getFileName() { final String fileName = fileText.getText(); if( isBlank( fileName ) ) return fileName; if( fileName.endsWith( FILE_EXTENSION ) ) return fileName; if( fileName.indexOf( "." ) != -1 && !fileName.endsWith( FILE_EXTENSION ) ) ... |
catch (NoSuchGroupException nsge) { _log.error( "Upgrade failed because data does not have a valid group id. " + "Manually assign a group id in the database."); } | private void _upgradeFolder() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_FOLDER); ps.setString(1, Group.DEFAULT_PARENT_GROUP_ID); rs = ps.executeQuery(); while ... | |
name, Layout.TYPE_PORTLET, false, null); | name, Layout.TYPE_PORTLET, false, StringPool.BLANK); | protected void addDefaultLayouts(Group group) throws PortalException, SystemException { String userId = User.getDefaultUserId(group.getCompanyId()); String name = PropsUtil.get(PropsUtil.DEFAULT_GUEST_LAYOUT_NAME); Layout layout = LayoutLocalServiceUtil.addLayout( group.getGroupId(), userId, false, Layout.DEFAUL... |
setModified(true); | public void setAltShipping(String altShipping) { if (((altShipping == null) && (_altShipping != null)) || ((altShipping != null) && (_altShipping == null)) || ((altShipping != null) && (_altShipping != null) && !altShipping.equals(_altShipping))) { if (!XSS_ALLOW_ALTSHIPPING) { altShipping = XSSUtil.str... | |
setModified(true); | public void setBillingCity(String billingCity) { if (((billingCity == null) && (_billingCity != null)) || ((billingCity != null) && (_billingCity == null)) || ((billingCity != null) && (_billingCity != null) && !billingCity.equals(_billingCity))) { if (!XSS_ALLOW_BILLINGCITY) { billingCity = XSSUtil.str... | |
setModified(true); | public void setBillingCompany(String billingCompany) { if (((billingCompany == null) && (_billingCompany != null)) || ((billingCompany != null) && (_billingCompany == null)) || ((billingCompany != null) && (_billingCompany != null) && !billingCompany.equals(_billingCompany))) { if (!XSS_ALLOW_BILLINGCOMPAN... | |
setModified(true); | public void setBillingCountry(String billingCountry) { if (((billingCountry == null) && (_billingCountry != null)) || ((billingCountry != null) && (_billingCountry == null)) || ((billingCountry != null) && (_billingCountry != null) && !billingCountry.equals(_billingCountry))) { if (!XSS_ALLOW_BILLINGCOUNTR... | |
setModified(true); | public void setBillingEmailAddress(String billingEmailAddress) { if (((billingEmailAddress == null) && (_billingEmailAddress != null)) || ((billingEmailAddress != null) && (_billingEmailAddress == null)) || ((billingEmailAddress != null) && (_billingEmailAddress != null) && !billingEmailAddress.equals(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.