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

Add class for all strings constant parameters #2415

Open
pedsf1968 opened this issue Sep 26, 2020 · 2 comments
Open

Add class for all strings constant parameters #2415

pedsf1968 opened this issue Sep 26, 2020 · 2 comments

Comments

@pedsf1968
Copy link

pedsf1968 commented Sep 26, 2020

Branch : develop-6.0.x

It's better to avoid mistakes to use final Class to declare all Strings constants like attributes, errors or paths.

We can create a class in package org.broadleafcommerce.common for all modules for BroadLeafCommerce Attributes :

Branch : develop-6.0.x
Feature : centralise-string-const
Package : org.broadleafcommerce.common
Class name : BLCA
Attributes starting with ATTRIBUTE_
Errors starting with ERROR_
Paths starting with PATH_

BLCA in package org.broadleafcommerce.common
image

and use like this in org.broadleafcommerce.profile.web.controller.validator.CustomerPhoneValidator Class

CustomerPhoneValidator in package org.broadleafcommerce.profile.web.controller.validator
image

I can implementing this basic feature for my first contribution to your project.
I'm waiting for your opinion

I thing i'ts better to separate Attributes, Errors and Paths in separates classes like:

  • CommonAttribute
  • CommonPath
  • CommonError
@pedsf1968
Copy link
Author

last attribute of rejectValue method isn't @nullable use method with only 2 args.

in Erros.class
void rejectValue(@nullable String var1, String var2);
void rejectValue(@nullable String var1, String var2, String var3);
void rejectValue(@nullable String var1, String var2, @nullable Object[] var3, @nullable String var4);

@pedsf1968
Copy link
Author

create feature centralise-string-const

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

No branches or pull requests

1 participant