diff options
Diffstat (limited to 'src/com/p4square/grow/ccb')
-rw-r--r-- | src/com/p4square/grow/ccb/CCBProgressReporter.java | 32 | ||||
-rw-r--r-- | src/com/p4square/grow/ccb/ChurchCommunityBuilderIntegrationDriver.java | 10 |
2 files changed, 42 insertions, 0 deletions
diff --git a/src/com/p4square/grow/ccb/CCBProgressReporter.java b/src/com/p4square/grow/ccb/CCBProgressReporter.java new file mode 100644 index 0000000..e2304fe --- /dev/null +++ b/src/com/p4square/grow/ccb/CCBProgressReporter.java @@ -0,0 +1,32 @@ +package com.p4square.grow.ccb; + +import com.p4square.ccbapi.CCBAPI; +import com.p4square.grow.frontend.ProgressReporter; +import org.restlet.security.User; + +import java.util.Date; + +/** + * A ProgressReporter which records progress in CCB. + * + * Except not really, because it's not implemented yet. + * This is just a placeholder until ccb-api-client-java has support for updating an individual. + */ +public class CCBProgressReporter implements ProgressReporter { + + private final CCBAPI mAPI; + + public CCBProgressReporter(final CCBAPI api) { + mAPI = api; + } + + @Override + public void reportAssessmentComplete(User user, String level, Date date, String results) { + // TODO + } + + @Override + public void reportChapterComplete(User user, String chapter, Date date) { + // TODO + } +} diff --git a/src/com/p4square/grow/ccb/ChurchCommunityBuilderIntegrationDriver.java b/src/com/p4square/grow/ccb/ChurchCommunityBuilderIntegrationDriver.java index 3aeca2c..48d143c 100644 --- a/src/com/p4square/grow/ccb/ChurchCommunityBuilderIntegrationDriver.java +++ b/src/com/p4square/grow/ccb/ChurchCommunityBuilderIntegrationDriver.java @@ -5,6 +5,7 @@ import com.p4square.ccbapi.CCBAPI; import com.p4square.ccbapi.CCBAPIClient; import com.p4square.grow.config.Config; import com.p4square.grow.frontend.IntegrationDriver; +import com.p4square.grow.frontend.ProgressReporter; import org.restlet.Context; import org.restlet.security.Verifier; @@ -22,6 +23,8 @@ public class ChurchCommunityBuilderIntegrationDriver implements IntegrationDrive private final CCBAPI mAPI; + private final CCBProgressReporter mProgressReporter; + public ChurchCommunityBuilderIntegrationDriver(final Context context) { mContext = context; mConfig = (Config) context.getAttributes().get("com.p4square.grow.config"); @@ -38,6 +41,8 @@ public class ChurchCommunityBuilderIntegrationDriver implements IntegrationDrive mAPI = api; + mProgressReporter = new CCBProgressReporter(mAPI); + } catch (URISyntaxException e) { throw new RuntimeException(e); } @@ -47,4 +52,9 @@ public class ChurchCommunityBuilderIntegrationDriver implements IntegrationDrive public Verifier newUserAuthenticationVerifier() { return new CCBUserVerifier(mAPI); } + + @Override + public ProgressReporter getProgressReporter() { + return mProgressReporter; + } } |