generated from cuioss/cui-java-module-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
94 changed files
with
3,732 additions
and
2,618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 46 additions & 31 deletions
77
src/main/java/de/cuioss/uimodel/application/CuiProjectStage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,46 @@ | ||
package de.cuioss.uimodel.application; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Generalization for JSFs / DeltaSpikes Project-Stage | ||
* | ||
* @author Oliver Wolff | ||
*/ | ||
public interface CuiProjectStage extends Serializable { | ||
|
||
/** | ||
* @return true if project stage is 'development'. | ||
*/ | ||
boolean isDevelopment(); | ||
|
||
/** | ||
* @return true if project stage is 'test'. | ||
*/ | ||
boolean isTest(); | ||
|
||
/** | ||
* @return true if project stage is 'configuration'. | ||
*/ | ||
boolean isConfiguration(); | ||
|
||
/** | ||
* @return true if project stage is 'production' or unknown. | ||
*/ | ||
boolean isProduction(); | ||
} | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package de.cuioss.uimodel.application; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Generalization for JSFs / DeltaSpikes Project-Stage | ||
* | ||
* @author Oliver Wolff | ||
*/ | ||
public interface CuiProjectStage extends Serializable { | ||
|
||
/** | ||
* @return true if project stage is 'development'. | ||
*/ | ||
boolean isDevelopment(); | ||
|
||
/** | ||
* @return true if project stage is 'test'. | ||
*/ | ||
boolean isTest(); | ||
|
||
/** | ||
* @return true if project stage is 'configuration'. | ||
*/ | ||
boolean isConfiguration(); | ||
|
||
/** | ||
* @return true if project stage is 'production' or unknown. | ||
*/ | ||
boolean isProduction(); | ||
} |
125 changes: 70 additions & 55 deletions
125
src/main/java/de/cuioss/uimodel/application/LoginCredentials.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,70 @@ | ||
package de.cuioss.uimodel.application; | ||
|
||
import static de.cuioss.tools.string.MoreStrings.isEmpty; | ||
|
||
import java.io.Serializable; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
/** | ||
* Simple class providing credentials for form-based login | ||
* | ||
* @author Oliver Wolff | ||
*/ | ||
@EqualsAndHashCode(exclude = "password", doNotUseGetters = true) | ||
@ToString(exclude = "password", doNotUseGetters = true) | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class LoginCredentials implements Serializable { | ||
|
||
private static final long serialVersionUID = -5554252114058479008L; | ||
|
||
@Getter | ||
@Setter | ||
private String password; | ||
|
||
@Getter | ||
@Setter | ||
private String username; | ||
|
||
@Getter | ||
@Setter | ||
private String userStore; | ||
|
||
@Getter | ||
@Setter | ||
private boolean rememberLoginCredentials; | ||
|
||
/** | ||
* Checks whether the given credentials are syntactically correct, saying {@link #getUsername()} | ||
* and {@link #getPassword()} are neither null nor empty. | ||
* | ||
* @return boolean indicating the completeness of the configuration | ||
*/ | ||
public boolean isComplete() { | ||
return !isEmpty(getUsername()) && !isEmpty(getPassword()); | ||
} | ||
|
||
} | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package de.cuioss.uimodel.application; | ||
|
||
import static de.cuioss.tools.string.MoreStrings.isEmpty; | ||
|
||
import java.io.Serializable; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
/** | ||
* Simple class providing credentials for form-based login | ||
* | ||
* @author Oliver Wolff | ||
*/ | ||
@EqualsAndHashCode(exclude = "password", doNotUseGetters = true) | ||
@ToString(exclude = "password", doNotUseGetters = true) | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class LoginCredentials implements Serializable { | ||
|
||
private static final long serialVersionUID = -5554252114058479008L; | ||
|
||
@Getter | ||
@Setter | ||
private String password; | ||
|
||
@Getter | ||
@Setter | ||
private String username; | ||
|
||
@Getter | ||
@Setter | ||
private String userStore; | ||
|
||
@Getter | ||
@Setter | ||
private boolean rememberLoginCredentials; | ||
|
||
/** | ||
* Checks whether the given credentials are syntactically correct, saying | ||
* {@link #getUsername()} and {@link #getPassword()} are neither null nor empty. | ||
* | ||
* @return boolean indicating the completeness of the configuration | ||
*/ | ||
public boolean isComplete() { | ||
return !isEmpty(getUsername()) && !isEmpty(getPassword()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
package de.cuioss.uimodel.field; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Extends {@linkplain TracedDynamicField} and include {@linkplain DynamicFieldType} information | ||
* | ||
* @author Eugen Fischer | ||
* @author Oliver Wolff | ||
* @param <T> bounded type must be {@link Serializable} | ||
*/ | ||
public interface DynamicField<T extends Serializable> extends TracedDynamicField<T> { | ||
|
||
/** | ||
* @return the content type of this field. | ||
*/ | ||
DynamicFieldType getFieldType(); | ||
} | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package de.cuioss.uimodel.field; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Extends {@linkplain TracedDynamicField} and include | ||
* {@linkplain DynamicFieldType} information | ||
* | ||
* @author Eugen Fischer | ||
* @author Oliver Wolff | ||
* @param <T> bounded type must be {@link Serializable} | ||
*/ | ||
public interface DynamicField<T extends Serializable> extends TracedDynamicField<T> { | ||
|
||
/** | ||
* @return the content type of this field. | ||
*/ | ||
DynamicFieldType getFieldType(); | ||
} |
Oops, something went wrong.