com.atlassian.confluence.plugins.rest.resources
Class I18nResource

java.lang.Object
  extended by com.atlassian.confluence.plugins.rest.resources.AbstractResource
      extended by com.atlassian.confluence.plugins.rest.resources.I18nResource

public class I18nResource
extends AbstractResource

Rest resource for accessing translations in Confluence.


Field Summary
 
Fields inherited from class com.atlassian.confluence.plugins.rest.resources.AbstractResource
authContext, uriInfo, userAccessor
 
Constructor Summary
I18nResource(UserAccessor userAccessor, com.atlassian.plugin.PluginAccessor pluginAccessor, LocaleManager localeManager, I18NBeanFactory i18NBeanFactory, HttpContext httpContext, SpacePermissionManager spacePermissionManager)
           
 
Method Summary
 javax.ws.rs.core.Response get(java.util.Set<java.lang.String> pluginKeys)
          Returns the text for the given plugin keys.
 javax.ws.rs.core.Response getI18n(java.lang.String pluginKey)
          Returns the text for the given plugin key.
 
Methods inherited from class com.atlassian.confluence.plugins.rest.resources.AbstractResource
createRequestContext, getAnonymousUserUriBuilder, getAttachmentUriBuilder, getContentUriBuilder, getCurrentUser, getMissingUserUriBuilder, getSpaceUriBuilder, getUserUriBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18nResource

public I18nResource(UserAccessor userAccessor,
                    com.atlassian.plugin.PluginAccessor pluginAccessor,
                    LocaleManager localeManager,
                    I18NBeanFactory i18NBeanFactory,
                    HttpContext httpContext,
                    SpacePermissionManager spacePermissionManager)
Method Detail

get

public javax.ws.rs.core.Response get(java.util.Set<java.lang.String> pluginKeys)
Returns the text for the given plugin keys.

Returns:

getI18n

public javax.ws.rs.core.Response getI18n(java.lang.String pluginKey)
Returns the text for the given plugin key. If the specified plugin key does not exist, or the caller does not have permission to access the plugin texts, the response is HTTP 404 (not found). Note that only JSON is returned. An example URL including a plugin key would look like this: http://host/confluence/rest/prototype/1/i18n/com.atlassian.confluence.tinymceplugin

Parameters:
pluginKey - The plugin key as it is defined in the atlassian-plugin.xml.
Returns:
all the translated keys for the given plugin key.


Copyright © 2003-2014 Atlassian. All Rights Reserved.