Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

AEM API refactor proposal #301

Merged
merged 8 commits into from Nov 27, 2018
Merged

AEM API refactor proposal #301

merged 8 commits into from Nov 27, 2018

Conversation

mkrzyzanowski
Copy link
Contributor

Description

This PR refactors the new AEM API a bit:

  • cleaned up couple unused elements, fixed typos
  • simplified FieldType interface
  • refactored Actions/Controller approach to a more unified one

Motivation and Context

  • making API more consistent

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code styleguide of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Refactored FieldType to string constants & renamed it to Fields; simplified DialogField as there is no need for the getType method anywhere
Now, there's a single controller interface/implementation and actions have two common interfaces instead of domain-specific duplicates
@@ -41,13 +42,14 @@

@Override
protected void configure() {
bind(SiteAdminController.class).to(AemSiteAdminController.class);
bind(Controller.class).to(BobcatController.class);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the only controller then it should be in AemCore module


@Override
@Step("Login to AEM and open page {aemAuthorPage.fullUrl}")
public void login(AemAuthorPage aemAuthorPage) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still think, it is a good use case

@mkrzyzanowski mkrzyzanowski merged commit 6fac27c into 2.0.0-develop Nov 27, 2018
@mkrzyzanowski mkrzyzanowski deleted the actions-refactor branch November 27, 2018 13:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants