Package org.pentaho.di.repository
Class RepositoryCommonValidations
java.lang.Object
org.pentaho.di.repository.RepositoryCommonValidations
- Author:
- Andrey Khayrutdinov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkUserInfo
(IUser user) Validatesuser
's data.static IUser
normalizeUserInfo
(IUser user) Normalizesuser
's data.
-
Constructor Details
-
RepositoryCommonValidations
public RepositoryCommonValidations()
-
-
Method Details
-
checkUserInfo
Validatesuser
's data. Common rule for all repositories is: both login and name must contain at least one meaningful char.- Parameters:
user
- user- Returns:
true
if user's login and name are not empty- Throws:
NullPointerException
- isuser
isnull
-
normalizeUserInfo
Normalizesuser
's data. According to common rules, simply trims login and name.- Parameters:
user
- user- Returns:
- normalized instance
- Throws:
NullPointerException
- ifuser
isnull
oruser
's login and name
-