Skip to content

Fixed: Remove unused code from ContentServices class file (OFBIZ-10397) - #1597

Open
vyasdevanshu wants to merge 1 commit into
apache:trunkfrom
vyasdevanshu:OFBIZ-10397
Open

Fixed: Remove unused code from ContentServices class file (OFBIZ-10397)#1597
vyasdevanshu wants to merge 1 commit into
apache:trunkfrom
vyasdevanshu:OFBIZ-10397

Conversation

@vyasdevanshu

Copy link
Copy Markdown
Contributor

Description

This PR addresses Jira ticket OFBIZ-10397: Remove unused code from ContentServices class file.

Key Changes

  1. Converted deactivateContentAssoc:

    • Converted deactivateContentAssoc in services.xml to engine="entity-auto" invoke="expire" default-entity-name="ContentAssoc" with <permission-service service-name="genericContentPermission" main-action="UPDATE"/>.
    • Removed legacy custom Java methods deactivateContentAssoc and deactivateContentAssocMethod from ContentServices.java.
  2. Purged Unused Services & Methods:

    • Removed definitions and Java implementation methods for:
      • urlEncodeArgs (and its unused invocation in CMSScreens.xml)
      • joinString
      • splitString
      • getPrefixedMembers
      • publishContent
      • renderContentAsText
      • renderSubContentAsText
  3. Permission Service Refactoring:

    • Refactored findRelatedContent in ContentServices.java to use standard genericContentPermission instead of legacy checkContentPermission.
  4. Unit Tests:

    • Added unit test cases testDeactivateContentAssoc and testFindRelatedContent in ContentTests.groovy.

Verification

  • ./gradlew compileJava compileTestGroovySUCCESS
  • ./gradlew checkstyleMain codenarcTestSUCCESS
  • ./gradlew "ofbiz --test component=content --test suite=contenttests"PASSED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants