Author: deepak
Date: Sat Aug 26 07:21:00 2017 New Revision: 1806264 URL: http://svn.apache.org/viewvc?rev=1806264&view=rev Log: Improved: Content : Remove unused imports from groovy files for code optimization.(OFBIZ-8487) Thanks Suraj Khurana and Pradeep Choudhary for your contribution Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/CmsEditAddPrep.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/MostRecentPrep.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/UserPermPrep.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchOptions.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchResults.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/contentsetup/UserPermPrep.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/datasetup/DataCategoryPrep.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/layout/EditSubContent.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyResponse.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSiteCMSMetaInfo.groovy ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSitePublishPoint.groovy Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/CmsEditAddPrep.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/CmsEditAddPrep.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/CmsEditAddPrep.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/CmsEditAddPrep.groovy Sat Aug 26 07:21:00 2017 @@ -17,14 +17,12 @@ * under the License. */ -import org.apache.ofbiz.base.util.* +import org.apache.ofbiz.base.util.Debug +import org.apache.ofbiz.base.util.UtilDateTime import org.apache.ofbiz.minilang.SimpleMapProcessor -import org.apache.ofbiz.content.ContentManagementWorker -import org.apache.ofbiz.content.content.ContentWorker import org.apache.ofbiz.content.data.DataResourceWorker import org.apache.ofbiz.webapp.ftl.FreeMarkerViewHandler -userLogin = session.getAttribute("userLogin") contentAssocDataResourceViewFrom = delegator.makeValue("ContentAssocDataResourceViewFrom") contentId = context.contentId Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/MostRecentPrep.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/MostRecentPrep.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/MostRecentPrep.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/MostRecentPrep.groovy Sat Aug 26 07:21:00 2017 @@ -17,13 +17,14 @@ * under the License. */ -import org.apache.ofbiz.base.util.* -import org.apache.ofbiz.entity.util.* +import org.apache.ofbiz.base.util.Debug +import org.apache.ofbiz.base.util.UtilHttp +import org.apache.ofbiz.base.util.UtilDateTime import org.apache.ofbiz.content.ContentManagementWorker -import org.apache.ofbiz.content.content.ContentWorker import org.apache.ofbiz.entity.condition.EntityCondition import org.apache.ofbiz.entity.condition.EntityOperator + Debug.logInfo("in mostrecentprep(1):","") paramMap = UtilHttp.getParameterMap(request) forumId = ContentManagementWorker.getFromSomewhere("moderatedSiteId", paramMap, request, context) Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/UserPermPrep.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/UserPermPrep.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/UserPermPrep.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/cms/UserPermPrep.groovy Sat Aug 26 07:21:00 2017 @@ -17,9 +17,9 @@ * under the License. */ -import org.apache.ofbiz.base.util.* -import org.apache.ofbiz.entity.condition.* +import org.apache.ofbiz.base.util.UtilHttp import org.apache.ofbiz.content.ContentManagementWorker +import org.apache.ofbiz.entity.model.ModelUtil paramMap = UtilHttp.getParameterMap(request) forumId = ContentManagementWorker.getFromSomewhere("permRoleSiteId", paramMap, request, context) Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchOptions.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchOptions.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchOptions.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchOptions.groovy Sat Aug 26 07:21:00 2017 @@ -17,9 +17,8 @@ * under the License. */ -import org.apache.ofbiz.base.util.* import java.sql.Timestamp -import org.apache.ofbiz.content.content.* +import org.apache.ofbiz.content.content.ContentSearchSession searchOperator = parameters.get("SEARCH_OPERATOR") if (!"AND".equals(searchOperator) && !"OR".equals(searchOperator)) { Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchResults.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchResults.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchResults.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/ContentSearchResults.groovy Sat Aug 26 07:21:00 2017 @@ -17,8 +17,9 @@ * under the License. */ -import org.apache.ofbiz.base.util.* -import org.apache.ofbiz.content.content.* +import org.apache.ofbiz.content.content.ContentSearchSession +import org.apache.ofbiz.content.content.ContentSearchEvents + // note: this can be run multiple times in the same request without causing problems, will check to see on its own if it has run again ContentSearchSession.processSearchParameters(parameters, request) Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/GetContentLookupList.groovy Sat Aug 26 07:21:00 2017 @@ -17,16 +17,15 @@ * under the License. */ - import org.apache.ofbiz.entity.condition.* - import org.apache.ofbiz.entity.util.* - import org.apache.ofbiz.entity.* - import org.apache.ofbiz.base.util.* - import org.apache.ofbiz.entity.transaction.TransactionUtil - import org.apache.ofbiz.entity.util.EntityListIterator - import org.apache.ofbiz.entity.GenericEntity - import org.apache.ofbiz.entity.model.ModelField - import org.apache.ofbiz.entity.model.ModelEntity - import org.apache.ofbiz.entity.model.ModelReader +import org.apache.ofbiz.entity.GenericEntityException +import org.apache.ofbiz.base.util.Debug +import org.apache.ofbiz.base.util.UtilFormatOut +import org.apache.ofbiz.base.util.UtilMisc +import org.apache.ofbiz.entity.transaction.TransactionUtil +import org.apache.ofbiz.entity.GenericEntity +import org.apache.ofbiz.entity.model.ModelField +import org.apache.ofbiz.entity.model.ModelEntity +import org.apache.ofbiz.entity.model.ModelReader module = "GetContentLookupList.groovy" Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/contentsetup/UserPermPrep.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/contentsetup/UserPermPrep.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/contentsetup/UserPermPrep.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/contentsetup/UserPermPrep.groovy Sat Aug 26 07:21:00 2017 @@ -17,13 +17,9 @@ * under the License. */ -import org.apache.ofbiz.base.util.* -import org.apache.ofbiz.entity.* -import org.apache.ofbiz.entity.condition.* -import org.apache.ofbiz.entity.model.* -import org.apache.ofbiz.entity.util.* -import org.apache.ofbiz.service.* +import org.apache.ofbiz.base.util.UtilHttp import org.apache.ofbiz.content.ContentManagementWorker +import org.apache.ofbiz.entity.model.ModelUtil paramMap = UtilHttp.getParameterMap(request) forumId = ContentManagementWorker.getFromSomewhere("webSitePublishPoint", paramMap, request, context) Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/datasetup/DataCategoryPrep.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/datasetup/DataCategoryPrep.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/datasetup/DataCategoryPrep.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/datasetup/DataCategoryPrep.groovy Sat Aug 26 07:21:00 2017 @@ -17,7 +17,6 @@ * under the License. */ -import org.apache.ofbiz.entity.* import org.apache.ofbiz.content.data.DataResourceWorker /** Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/layout/EditSubContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/layout/EditSubContent.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/layout/EditSubContent.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/layout/EditSubContent.groovy Sat Aug 26 07:21:00 2017 @@ -17,18 +17,13 @@ * under the License. */ -import org.apache.ofbiz.base.util.* +import org.apache.ofbiz.base.util.UtilHttp import org.apache.ofbiz.base.util.template.FreeMarkerWorker -import org.apache.ofbiz.entity.* -import org.apache.ofbiz.entity.model.* import org.apache.ofbiz.content.data.DataResourceWorker import org.apache.ofbiz.webapp.ftl.FreeMarkerViewHandler -import java.io.StringWriter import freemarker.template.WrappingTemplateModel -import javax.servlet.* -import javax.servlet.http.* Locale locale = UtilHttp.getLocale(request) if (currentValue) { Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyQuestions.groovy Sat Aug 26 07:21:00 2017 @@ -17,9 +17,8 @@ * under the License. */ -import org.apache.ofbiz.entity.* -import org.apache.ofbiz.entity.condition.* -import org.apache.ofbiz.base.util.* +import org.apache.ofbiz.base.util.Debug +import org.apache.ofbiz.entity.GenericEntityException module = "EditSurveyQuestions.groovy" surveyQuestionId = parameters.surveyQuestionId @@ -63,7 +62,6 @@ try { } finally { listIt.close() } - surveyPageList = from("SurveyPage").where("surveyId", surveyId).orderBy("sequenceNum").queryList() surveyMultiRespList = from("SurveyMultiResp").where("surveyId", surveyId).orderBy("multiRespTitle").queryList() Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyResponse.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyResponse.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyResponse.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/survey/EditSurveyResponse.groovy Sat Aug 26 07:21:00 2017 @@ -17,8 +17,8 @@ * under the License. */ -import org.apache.ofbiz.content.survey.* -import org.apache.ofbiz.base.util.* +import org.apache.ofbiz.content.survey.SurveyWrapper +import org.apache.ofbiz.base.util.UtilURL surveyResponseId = parameters.surveyResponseId partyId = null Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSiteCMSMetaInfo.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSiteCMSMetaInfo.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSiteCMSMetaInfo.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSiteCMSMetaInfo.groovy Sat Aug 26 07:21:00 2017 @@ -17,10 +17,6 @@ * under the License. */ -import org.apache.ofbiz.entity.* -import org.apache.ofbiz.entity.condition.* -import org.apache.ofbiz.entity.util.* - if (content) { // lookup assoc content title = from("ContentAssoc").where("contentId", contentId, "mapKey", "title").orderBy("-fromDate").filterByDate().queryFirst() Modified: ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSitePublishPoint.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSitePublishPoint.groovy?rev=1806264&r1=1806263&r2=1806264&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSitePublishPoint.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/website/WebSitePublishPoint.groovy Sat Aug 26 07:21:00 2017 @@ -17,9 +17,6 @@ * under the License. */ -import org.apache.ofbiz.entity.condition.* -import org.apache.ofbiz.entity.util.* - webSiteContent = from("WebSiteContent").where("webSiteId", webSiteId, "webSiteContentTypeId", "PUBLISH_POINT").orderBy("-fromDate").cache().filterByDate().queryFirst() if (webSiteContent) { content = webSiteContent.getRelatedOne("Content", false) |
Free forum by Nabble | Edit this page |