@RequestMapping(value="/api/3/system/context") @Controller public class SocialContextController extends Object
| Constructor and Description |
|---|
SocialContextController() |
| Modifier and Type | Method and Description |
|---|---|
org.craftercms.profile.api.Profile |
addProfileToContext(String contextId,
String profileId,
String roles) |
SocialContext |
create(String contextName) |
boolean |
deletePreferences(String preferences) |
Iterable<SocialContext> |
getAllContexts() |
Map<String,Object> |
getContextPreference() |
Map<String,Object> |
getEmailConfiguration() |
Map<String,String> |
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) |
Map<String,Object> |
setEmailConfiguration(String host,
String encoding,
int port,
boolean auth,
String username,
String password,
boolean tls,
String replyTo,
String from,
int priority,
String subject) |
@RequestMapping(value="/all",
method=GET)
@ResponseBody
public Iterable<SocialContext> getAllContexts()
throws SocialException
SocialException@RequestMapping(method=POST) @ResponseBody public SocialContext create(@RequestParam String contextName) throws SocialException
SocialException@RequestMapping(value="/{id}/{profileId}",
method=POST)
@ResponseBody
public org.craftercms.profile.api.Profile addProfileToContext(@PathVariable(value="id")
String contextId,
@PathVariable(value="profileId")
String profileId,
@RequestParam
String roles)
throws SocialException
SocialException@RequestMapping(value="/{id}/{profileId}/delete",
method={DELETE,POST})
@ResponseBody
public org.craftercms.profile.api.Profile removeProfileFromContext(@PathVariable(value="id")
String contextId,
@PathVariable(value="profileId")
String profileId)
throws SocialException
SocialException@RequestMapping(value="/preferences/email",
method={PUT,POST})
@ResponseBody
public boolean saveEmailTemplate(@RequestParam(required=true)
String template,
@RequestParam(required=true)
String type)
throws SocialException
SocialException@RequestMapping(value="/preferences/email",
method=GET)
@ResponseBody
public Map<String,String> getSaveEmailTemplate(@RequestParam(required=true)
String type)
throws SocialException
SocialException@RequestMapping(value="/preferences/email/config",
method=GET)
@ResponseBody
public Map<String,Object> getEmailConfiguration()
throws SocialException
SocialException@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
SocialException@RequestMapping(value="/preferences",
method=GET)
@ResponseBody
public Map<String,Object> getContextPreference()
@RequestMapping(value="/updatePreference",
method={POST,PUT})
@ResponseBody
public boolean savePreferences(@RequestParam
Map<String,Object> preferences)
@RequestMapping(value="/deletePreferences",
method={POST,DELETE})
@ResponseBody
public boolean deletePreferences(@RequestParam
String preferences)
Copyright © 2018 CrafterCMS. All rights reserved.