-
Notifications
You must be signed in to change notification settings - Fork 13
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
Brooks Johnson
committed
Jan 20, 2023
1 parent
ad4aeed
commit 7b8c54f
Showing
14 changed files
with
193 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Created by bjohnson on 1/20/23. | ||
*/ | ||
|
||
public with sharing class BlogFramework extends WebFramework { | ||
|
||
public BlogFramework(ITheme theme){ | ||
super(theme); | ||
} | ||
|
||
public override void capability() { | ||
System.debug('This app does not support menu and it is not styled'); | ||
} | ||
|
||
|
||
public override void showMenuBody() { | ||
theme.styleContent(); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/Bridge/BlogFramework.cls-meta.xml
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>52.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
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,15 @@ | ||
/** | ||
* Created by bjohnson on 1/20/23. | ||
*/ | ||
|
||
public with sharing class CMSFramework extends WebFramework { | ||
|
||
public CMSFramework(ITheme theme) { | ||
super(theme); | ||
} | ||
|
||
public override void capability() { | ||
System.debug('This is a CMS Framework and supports workflow to ' + | ||
'publish public content'); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/Bridge/CMSFramework.cls-meta.xml
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>52.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
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,11 @@ | ||
/** | ||
* Created by bjohnson on 1/19/23. | ||
*/ | ||
|
||
public interface ITheme { | ||
|
||
void styleHeader(); | ||
void styleFooter(); | ||
void styleMenu(); | ||
void styleContent(); | ||
} |
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>52.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
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,27 @@ | ||
/** | ||
* Created by bjohnson on 1/19/23. | ||
*/ | ||
|
||
public with sharing class Theme_WhiteBlue implements ITheme { | ||
|
||
|
||
public void styleHeader() { | ||
System.debug('Header font size : 16 px'); | ||
System.debug('Background: Blue, Color: black'); | ||
} | ||
|
||
public void styleFooter() { | ||
System.debug('Footer - font size : 14 px'); | ||
System.debug('Background : White, Color: blue'); | ||
} | ||
|
||
public void styleMenu() { | ||
System.debug('Menu - font size : 12 px'); | ||
System.debug('Background : blue, Color: white'); | ||
} | ||
|
||
public void styleContent() { | ||
System.debug('Content - font size : 16px'); | ||
System.debug('Background : white, Color: blue'); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/Bridge/Theme_WhiteBlue.cls-meta.xml
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>52.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
27 changes: 27 additions & 0 deletions
27
force-app/main/default/classes/Bridge/Theme_WhiteGreen.cls
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,27 @@ | ||
/** | ||
* Created by bjohnson on 1/19/23. | ||
*/ | ||
|
||
public with sharing class Theme_WhiteGreen implements ITheme { | ||
|
||
|
||
public void styleHeader() { | ||
System.debug('Header - font size : 16px'); | ||
System.debug('Background : Green, Color : Black'); | ||
} | ||
|
||
public void styleFooter() { | ||
System.debug('Footer - font size : 14px'); | ||
System.debug('Background : White, Color : Green'); | ||
} | ||
|
||
public void styleMenu() { | ||
System.debug('Footer, Font size : 14px'); | ||
System.debug('Background : White, Color : Green'); | ||
} | ||
|
||
public void styleContent() { | ||
System.debug('menu - font size : 14px'); | ||
System.debug('Background : White, Color : Green'); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/Bridge/Theme_WhiteGreen.cls-meta.xml
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>52.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
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,43 @@ | ||
/** | ||
* Created by bjohnson on 1/20/23. | ||
*/ | ||
|
||
public with sharing abstract class WebFramework { | ||
|
||
protected ITheme theme; | ||
private String title; | ||
private String keyword; | ||
private String content; | ||
|
||
public WebFramework(ITheme theme){ | ||
this.theme = theme; | ||
} | ||
|
||
//concrete web framework must implement this | ||
public abstract void capability(); | ||
|
||
private void setProperties(String title, String keyword, String content){ | ||
this.title = title; | ||
this.keyword = keyword; | ||
this.content = content; | ||
} | ||
|
||
private void printTitle() { | ||
System.debug('Title: ' + this.title); | ||
} | ||
|
||
private void printKeyword() { | ||
system.debug('Keyword: ' + this.keyword); | ||
} | ||
|
||
public virtual void showHeader_Footer(){ | ||
this.theme.styleHeader(); | ||
this.theme.styleFooter(); | ||
} | ||
|
||
public virtual void showMenuBody(){ | ||
this.theme.styleMenu(); | ||
this.theme.styleContent(); | ||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
force-app/main/default/classes/Bridge/WebFramework.cls-meta.xml
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>52.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.