-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
38 changed files
with
1,008 additions
and
214 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
53 changes: 53 additions & 0 deletions
53
src/main/java/com/jwebmp/core/annotations/PageConfiguration.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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (C) 2017 GedMarc | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.jwebmp.core.annotations; | ||
|
||
import com.guicedee.services.jsonrepresentation.json.StaticStrings; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* @author GedMarc | ||
* @since 05 Apr 2017 | ||
*/ | ||
@Target({ElementType.TYPE, ElementType.TYPE_USE}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Inherited | ||
@Documented | ||
public @interface PageConfiguration | ||
{ | ||
/** | ||
* Specifies the URL that this page serves | ||
* | ||
* @return | ||
*/ | ||
String url() default StaticStrings.STRING_FORWARD_SLASH; | ||
|
||
/** | ||
* Specifies the type this page serves (best to leave it alone - or only use one page for error types etc) | ||
* | ||
* @return | ||
*/ | ||
PageTypes type() default PageTypes.Default; | ||
|
||
/** | ||
* If this configuration should be ignored on deployed | ||
* | ||
* @return | ||
*/ | ||
boolean ignore() default false; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (C) 2017 GedMarc | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.jwebmp.core.annotations; | ||
|
||
/** | ||
* @author GedMarc | ||
* @since 05 Apr 2017 | ||
*/ | ||
public enum PageTypes | ||
{ | ||
Default, | ||
Mobile, | ||
Error; | ||
/** | ||
* Any sub data | ||
*/ | ||
private String data; | ||
|
||
/** | ||
* A new PageTypes | ||
*/ | ||
PageTypes() | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* Returns the name or the data contained within | ||
* | ||
* @return | ||
*/ | ||
@Override | ||
public String toString() | ||
{ | ||
if (data != null && !data.isEmpty()) | ||
{ | ||
return data; | ||
} | ||
else | ||
{ | ||
return name(); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.