Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-56372 Extend CommandAction framework to have better support for resourceURLs and renderURLs #27381

Closed

Conversation

sergiogonzalez
Copy link

No description provided.

Sergio Gonzalez added 13 commits June 16, 2015 08:41
…es because right now they are stored in a single one and they are overlapped. This means that it cannot be declared 2 different actions commands for the action phase and the resource phase.
… the resource phase it uses the new resourcecommandactions.
…javax.portlet.name value but also the parameter struts_action if it's present
…y similar we can abstract them out using generics
…k will invoke the renderPhase based on a parameter name strutsAction.
…uld all use command.name for simplicity. Adapt some ActionCommand that should use ResourceCommand.
…ActionREsponse we should update the API accordingly. However, this API cannot be deprecated because before it was invoked for both actionURL and resourceURLs but now it's only invoked for actionURL so it's better to break the API to make the developers know that the behaviour change. I will add a not in BREAKING_CHANGES file.
@sergiogonzalez sergiogonzalez changed the title LPS-56372 Remove unnecessary code LPS-56372 Extend CommandAction framework to have better support for resourceURLs and render Jun 16, 2015
@sergiogonzalez sergiogonzalez changed the title LPS-56372 Extend CommandAction framework to have better support for resourceURLs and render LPS-56372 Extend CommandAction framework to have better support for resourceURLs and renderURLs Jun 16, 2015
@liferay-continuous-integration
Copy link
Collaborator

Some tests FAILED!

Build Time: 28 minutes 47 seconds

See the following links for more information.

1 Failure.

  • com.liferay.portal.util.InitUtilTest.testBaseSeleniumTestCaseSpringConfigs
    java.lang.IllegalStateException: The system has not be activated yet.

    java.lang.RuntimeException: java.lang.IllegalStateException: The system has not be activated yet.
    at com.liferay.portal.util.InitUtil.stopRuntime(InitUtil.java:248)
    at com.liferay.portal.util.InitUtilTest.testBaseSeleniumTestCaseSpringConfigs(InitUtilTest.java:70)
    at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:62)
    Caused by: java.lang.IllegalStateException: The system has not be activated yet.
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.setStartLevel(ModuleContainer.java:1442)
    at com.liferay.portal.bootstrap.ModuleFrameworkImpl.stopRuntime(ModuleFrameworkImpl.java:410)
    at com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.stopRuntime(ModuleFrameworkUtilAdapter.java:115)
    at com.liferay.portal.util.InitUtil.stopRuntime(InitUtil.java:245)

@sergiogonzalez
Copy link
Author

Hey @rotty3000 @peterfellwock @marcellustavares @brunobasto @leoadb @juliocamarero @epgarcia @mhan810

I have extend the MVCPortlet framework regarding ActionCommand.java. Before we were using ActionCommand.java for both actionURL and resourceURL. I have splitted that in 2 different interfaces. Besides that, the ResourceCommand that will be used is based on resourceID and not based on ActionRequest.ACTION_NAME parameter.
I have also created a new one for renderURL using the mvcAction parameter so the render of the RenderCommand will be invoked based on mvcAction parameter.

I have modified all the uses that I could find in your plugins, so when ActionCommand were used for resourceURLs I have updated that to use ResourceCommand classes. I have done all the changes and you guys shouldn't need to do anything, I'm just ccing you so you're aware of the changes and you can check them or ask any question you may have.

@marcellustavares I have also done a fix for DDM in sergiogonzalez@ee5711e because that URL wasn't pointing to any resource handling logic

Thanks

@sergiogonzalez
Copy link
Author

ci:retest

@marcellustavares
Copy link

Thanks @sergiogonzalez, nice improvement :) Thanks for doing that

@brunobasto
Copy link

Thank you, @sergiogonzalez!!

@sergiogonzalez
Copy link
Author

cc/ @izaera @JorgeFerrer

@rotty3000
Copy link

rotty3000 commented Jun 16, 2015 via email

@brianchandotcom
Copy link
Owner

Hey @sergiogonzalez This is very good. Can you resend in separate pulls:

First pull:

1.) Rename "action.command.name" to "mvc.command.name" I think it's easier to comprehend at the OSGi @component level if we prefix everything wth mvc.*

2.) Rename "ActionCommand" to "MVCActionCommand" in preparation for "MVCRenderCommand" etc.

Second pull:

Add Render and Resource specific things.

Thx @sergiogonzalez

@sergiogonzalez sergiogonzalez deleted the LPS-56372_F branch April 18, 2016 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants