Upload
jared-ottley
View
550
Download
1
Embed Size (px)
DESCRIPTION
Lightning talk On Alfresco and Spring Social
Citation preview
Spring-Social, Alfresco and Spring-Social-Alfresco
Jared Ottley
Spring-Social, Alfresco and Spring-Social-Alfresco
Jared Ottley
Spring-Social is….
Not just about social
oAuth1/oAuth2 Authentication Framework
Client API
Spring-Social is….
Not just about social
oAuth1/oAuth2 Authentication Framework
Client API
Spring-Social Modules
Facebook, Twitter, Linkedin
Spring-Social Modules
Spring Social 500pxSpring Social App.netSpring Social BitBucketSpring Social DiggSpring Social DropboxSpring Social FlattrSpring Social FlickrSpring Social FoursquareSpring Social GeekListSpring Social GoogleSpring Social Instagram
Spring-Social Modules
Spring Social Intuit (Quickbooks Online)Spring Social Last.fmSpring Social Live (Windows Live)Spring Social MisoSpring Social MixcloudSpring Social NkSpring Social SalesforceSpring Social SoundCloudSpring Social TumblrSpring Social ViadeoSpring Social VkontakteSpring Social Weibo
Spring-Social Modules
Spring Social XingSpring Social YammerSpring Social Security ModuleSpring Social Grails Plugin
Alfresco uses…
Spring-Social-FacebookSpring-Social-LinkedinSpring-Social-TwitterSpring-Social-Flickr
Alfresco uses…
Spring-Social-FacebookSpring-Social-LinkedinSpring-Social-TwitterSpring-Social-Flickr
Alfresco Integrations use…
Spring-Social-DropboxSpring-Social-Google-Docs
Alfresco Integrations use…
Spring-Social-DropboxSpring-Social-Google-Docs
Alfresco provides…
4.1+ and Community
Persistence of OAuth Tokens
OAuth1CredentialsStoreServiceOAuth2CredentialsStoreService
Alfresco provides…
CRUD Operations
Shared TokensPersonal Tokens
Lookup by RemoteSystemId
Alfresco provides…
CRUD Operations
Shared TokensPersonal Tokens
Lookup by RemoteSystemId
Spring-Social-Alfresco
A project that provides Authentication and Client API to the Alfresco Public API (JSON and CMIS)
CMIS 1.0 Support
JSON REST API--Site Membership--Network/Site--Tags--Comments
Spring-Social-Alfresco
A project that provides Authentication and Client API to the Alfresco Public API (JSON and CMIS)
CMIS 1.0 Support
JSON REST API--Site Membership--Network/Site--Tags--Comments
How To
AlfrescoConnectionFactory connectionFactory = new AlfrescoConnectionFactory(consumerKey, consumerSecret); OAuth2Parameters parameters = new OAuth2Parameters();parameters.setRedirectUri("http://localhost:8080/alfoauthsample/mycallback.html"); parameters.setScope(Alfresco.DEFAULT_SCOPE);parameters.setState("test");
How To
String authUrl = connectionFactory.getOAuthOperations().buildAuthenticateUrl(GrantType.AUTHORIZATION_CODE, parameters);
//Do the dance here …
AccessGrant accessGrant = connectionFactory.getOAuthOperations().exchangeForAccess(accessToken, redirectUri, null);
//Persist your tokens here …
How To
Connection<Alfresco> connection = connectionFactory.createConnection(accessGrant);
Alfresco alfresco = connection.getApi();
//Use Alfresco public REST API here Network homeNetwork = alfresco.getHomeNetwork(); Person currentUser = alfresco.getCurrentUser(); Member member = alfresco.addMember(network, site, memberId, Role.SiteConsumer);
How To
//Get CMIS SessionSession session = alfresco.getCMISSession(network);
ItemIterable<QueryResult> paginatedResults = session.query(SITES_QUERY, false, paginateContext).skipTo(count).getPage();
Map<String, Object> properties = new HashMap<String, Object>(); properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); properties.put(PropertyIds.NAME, document.getName());
parent.createDocument(properties, document.getContentStream(), VersioningState.MAJOR);
How To
//Get CMIS SessionSession session = alfresco.getCMISSession(network);
ItemIterable<QueryResult> paginatedResults = session.query(SITES_QUERY, false, paginateContext).skipTo(count).getPage();
Map<String, Object> properties = new HashMap<String, Object>(); properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document"); properties.put(PropertyIds.NAME, document.getName());
parent.createDocument(properties, document.getContentStream(), VersioningState.MAJOR);
No better than setUp() and tearDown()?
• Fundamentally different.Thank you!
http://www.springsource.org/spring-social
https://github.com/Alfresco/spring-social-alfresco
twitter: @jottley
No better than setUp() and tearDown()?
• Fundamentally different.Thank you!
http://www.springsource.org/spring-social
https://github.com/Alfresco/spring-social-alfresco
twitter: @jottley