diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2016-04-09 15:53:24 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2016-04-09 15:53:24 -0700 |
commit | 371ccae3d1f31ec38f4af77fb7fcd175d49b3cd5 (patch) | |
tree | 38c4f1e8828f9af9c4b77a173bee0d312b321698 /src/com/p4square/f1oauth/FellowshipOneIntegrationDriver.java | |
parent | bbf907e51dfcf157bdee24dead1d531122aa25db (diff) | |
parent | 3102d8bce3426d9cf41aeaf201c360d342677770 (diff) |
Merge pull request #10 from PuyallupFoursquare/maven
Switching from Ivy+Ant to Maven.
Diffstat (limited to 'src/com/p4square/f1oauth/FellowshipOneIntegrationDriver.java')
-rw-r--r-- | src/com/p4square/f1oauth/FellowshipOneIntegrationDriver.java | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/com/p4square/f1oauth/FellowshipOneIntegrationDriver.java b/src/com/p4square/f1oauth/FellowshipOneIntegrationDriver.java deleted file mode 100644 index 865f5d6..0000000 --- a/src/com/p4square/f1oauth/FellowshipOneIntegrationDriver.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.p4square.f1oauth; - -import com.codahale.metrics.MetricRegistry; -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; - -/** - * The FellowshipOneIntegrationDriver creates implementations of various - * objects to support integration with Fellowship One. - */ -public class FellowshipOneIntegrationDriver implements IntegrationDriver { - - private final Context mContext; - private final MetricRegistry mMetricRegistry; - private final Config mConfig; - private final F1Access mAPI; - - private final ProgressReporter mProgressReporter; - - public FellowshipOneIntegrationDriver(final Context context) { - mContext = context; - mConfig = (Config) context.getAttributes().get("com.p4square.grow.config"); - mMetricRegistry = (MetricRegistry) context.getAttributes().get("com.p4square.grow.metrics"); - - mAPI = new F1Access(context, - mConfig.getString("f1ConsumerKey", ""), - mConfig.getString("f1ConsumerSecret", ""), - mConfig.getString("f1BaseUrl", "staging.fellowshiponeapi.com"), - mConfig.getString("f1ChurchCode", "pfseawa"), - F1Access.UserType.WEBLINK); - mAPI.setMetricRegistry(mMetricRegistry); - - mProgressReporter = new F1ProgressReporter(mAPI); - } - - /** - * @return An F1Access instance. - */ - public F1Access getF1Access() { - return mAPI; - } - - @Override - public Verifier newUserAuthenticationVerifier() { - return new SecondPartyVerifier(mContext, mAPI); - } - - @Override - public ProgressReporter getProgressReporter() { - return mProgressReporter; - } -} |