com.jalios.jcms.rest
Class RestManager

java.lang.Object
  extended by com.jalios.jcms.rest.RestManager

public class RestManager
extends Object

Hold JCMS configuration of OpenAPI. RestResource may be added.

Since:
JCMS-6.0
Version:
$Revision: 23462 $
Author:
dissert

Field Summary
static String PROPKEY_ENABLE
           
static String PROPKEY_READACCESS_ENABLE
           
static String PROPKEY_READACCESS_IPFILTER
           
static String PROPKEY_WRITEACCESS_ENABLE
           
static String PROPKEY_WRITEACCESS_IPFILTER
           
 
Method Summary
 void addResourcesMap(Plugin plugin, Map<String,Class<? extends JcmsRestResource>> resourcesMap)
           
 boolean checkReadAccessIP(String ip)
          Returns true if the given IP address is authorized for read for REST request.
 boolean checkWriteAccessIP(String ip)
          Returns true if the given IP address is authorized for write for REST request.
 Map<Plugin,Map<String,Class<? extends JcmsRestResource>>> getExtendedResourcesMap()
           
static RestManager getInstance()
           
 void init()
          Initialize the RestManager.
 boolean isEnable()
           
 boolean isReadAccessEnable()
           
 boolean isWriteAccessEnable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPKEY_ENABLE

public static final String PROPKEY_ENABLE
See Also:
Constant Field Values

PROPKEY_READACCESS_ENABLE

public static final String PROPKEY_READACCESS_ENABLE
See Also:
Constant Field Values

PROPKEY_READACCESS_IPFILTER

public static final String PROPKEY_READACCESS_IPFILTER
See Also:
Constant Field Values

PROPKEY_WRITEACCESS_ENABLE

public static final String PROPKEY_WRITEACCESS_ENABLE
See Also:
Constant Field Values

PROPKEY_WRITEACCESS_IPFILTER

public static final String PROPKEY_WRITEACCESS_IPFILTER
See Also:
Constant Field Values
Method Detail

getInstance

public static final RestManager getInstance()

init

public void init()
Initialize the RestManager.
This method can be called multiple time during the lifetime of the site, for example on properties change.


checkReadAccessIP

public boolean checkReadAccessIP(String ip)
Returns true if the given IP address is authorized for read for REST request. (It doesn't check if either Rest is enabled or Read access is enabled).

Parameters:
ip - the IP address to be checked
Returns:
true if the given IP address is authorized.

checkWriteAccessIP

public boolean checkWriteAccessIP(String ip)
Returns true if the given IP address is authorized for write for REST request. (It doesn't check if either Rest is enabled or Write access is enabled).

Parameters:
ip - the IP address to be checked
Returns:
true if the given IP address is authorized.

isEnable

public boolean isEnable()

isReadAccessEnable

public boolean isReadAccessEnable()

isWriteAccessEnable

public boolean isWriteAccessEnable()

addResourcesMap

public void addResourcesMap(Plugin plugin,
                            Map<String,Class<? extends JcmsRestResource>> resourcesMap)

getExtendedResourcesMap

public Map<Plugin,Map<String,Class<? extends JcmsRestResource>>> getExtendedResourcesMap()


Copyright © 2001-2007 Jalios SA. All Rights Reserved.