Package ru.vyarus.guicey.admin
Class AdminRestBundle
- java.lang.Object
-
- ru.vyarus.dropwizard.guice.module.context.unique.item.UniqueGuiceyBundle
-
- ru.vyarus.guicey.admin.AdminRestBundle
-
- All Implemented Interfaces:
ru.vyarus.dropwizard.guice.module.installer.bundle.GuiceyBundle
public class AdminRestBundle extends ru.vyarus.dropwizard.guice.module.context.unique.item.UniqueGuiceyBundleAdds rest support in admin context by simply redirecting from admin servlet into jersey (all rest methods are accessible from admin context).Such approach is better than registering completely separate jersey context for admin rest because of no overhead and simplicity of jersey extensions management.
If no specific mapping path specified, rest will be mapped into the same path as main rest. If main rest mapping default ('/*') isn't changed, admin rest will be mapped to '/api/*'.
In order to hide admin specific rest methods or entire resources
AdminResourceannotation may be used. If some security solution is used within application, rest could be hidden with security framework permissions.- Since:
- 05.08.2015
-
-
Constructor Summary
Constructors Constructor Description AdminRestBundle()Admin rest will be mapped on the same path as main rest if rest mapping is different from '/*'.AdminRestBundle(java.lang.String path)Path must end with '/*', otherwise error will be thrown.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun(ru.vyarus.dropwizard.guice.module.installer.bundle.GuiceyEnvironment environment)-
Methods inherited from class ru.vyarus.dropwizard.guice.module.context.unique.item.UniqueGuiceyBundle
equals, hashCode
-
-
-
-
Constructor Detail
-
AdminRestBundle
public AdminRestBundle()
Admin rest will be mapped on the same path as main rest if rest mapping is different from '/*'. Otherwise admin rest mapped to '/api/*'.
-
AdminRestBundle
public AdminRestBundle(java.lang.String path)
Path must end with '/*', otherwise error will be thrown. For example, '/rest/*' is a valid path.- Parameters:
path- path to map admin rest on
-
-