Class SocialContextController
java.lang.Object
org.craftercms.social.controllers.rest.v3.system.SocialContextController
@Controller
@RequestMapping("/api/3/system/context")
public class SocialContextController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.craftercms.profile.api.Profile
addProfileToContext
(String contextId, String profileId, String roles) boolean
deletePreferences
(String preferences) getSaveEmailTemplate
(String type) org.craftercms.profile.api.Profile
removeProfileFromContext
(String contextId, String profileId) boolean
saveEmailTemplate
(String template, String type) boolean
savePreferences
(Map<String, Object> preferences) setEmailConfiguration
(String host, String encoding, int port, boolean auth, String username, String password, boolean tls, String replyTo, String from, int priority, String subject)
-
Constructor Details
-
SocialContextController
public SocialContextController()
-
-
Method Details
-
getAllContexts
@RequestMapping(value="/all", method=GET) @ResponseBody public Iterable<SocialContext> getAllContexts() throws SocialException- Throws:
SocialException
-
create
@RequestMapping(method=POST) @ResponseBody public SocialContext create(@RequestParam String contextName) throws SocialException - Throws:
SocialException
-
addProfileToContext
@RequestMapping(value="/{id}/{profileId}", method=POST) @ResponseBody public org.craftercms.profile.api.Profile addProfileToContext(@PathVariable("id") String contextId, @PathVariable("profileId") String profileId, @RequestParam String roles) throws SocialException - Throws:
SocialException
-
removeProfileFromContext
@RequestMapping(value="/{id}/{profileId}/delete", method={DELETE,POST}) @ResponseBody public org.craftercms.profile.api.Profile removeProfileFromContext(@PathVariable("id") String contextId, @PathVariable("profileId") String profileId) throws SocialException - Throws:
SocialException
-
saveEmailTemplate
@RequestMapping(value="/preferences/email", method={PUT,POST}) @ResponseBody public boolean saveEmailTemplate(@RequestParam(required=true) String template, @RequestParam(required=true) String type) throws SocialException - Throws:
SocialException
-
getSaveEmailTemplate
@RequestMapping(value="/preferences/email", method=GET) @ResponseBody public Map<String,String> getSaveEmailTemplate(@RequestParam(required=true) String type) throws SocialException - Throws:
SocialException
-
getEmailConfiguration
@RequestMapping(value="/preferences/email/config", method=GET) @ResponseBody public Map<String,Object> getEmailConfiguration() throws SocialException- Throws:
SocialException
-
setEmailConfiguration
@RequestMapping(value="/preferences/email/config", method={POST,PUT}) @ResponseBody public Map<String,Object> setEmailConfiguration(@RequestParam(required=true) String host, @RequestParam(required=true) String encoding, @RequestParam(required=true) int port, @RequestParam(required=true) boolean auth, @RequestParam(required=true) String username, @RequestParam(required=true) String password, @RequestParam(required=true) boolean tls, @RequestParam(required=true) String replyTo, @RequestParam(required=true) String from, @RequestParam(required=true) int priority, @RequestParam(required=true) String subject) throws SocialException - Throws:
SocialException
-
getContextPreference
-
savePreferences
-
deletePreferences
@RequestMapping(value="/deletePreferences", method={POST,DELETE}) @ResponseBody public boolean deletePreferences(@RequestParam String preferences)
-