Search in sources :

Example 1 with ASMResourcesGenerator

use of org.glassfish.admin.rest.generator.ASMResourcesGenerator in project Payara by payara.

the class RestManagementResourceProvider method generateASM.

private void generateASM(ServiceLocator habitat) {
    try {
        Domain entity = habitat.getService(Domain.class);
        Dom dom = Dom.unwrap(entity);
        ResourcesGenerator resourcesGenerator = new ASMResourcesGenerator(habitat);
        resourcesGenerator.generateSingle(dom.document.getRoot().model, dom.document);
        resourcesGenerator.endGeneration();
    } catch (Exception ex) {
        RestLogging.restLogger.log(Level.SEVERE, null, ex);
    }
}
Also used : Dom(org.jvnet.hk2.config.Dom) ASMResourcesGenerator(org.glassfish.admin.rest.generator.ASMResourcesGenerator) ResourcesGenerator(org.glassfish.admin.rest.generator.ResourcesGenerator) Domain(com.sun.enterprise.config.serverbeans.Domain) ASMResourcesGenerator(org.glassfish.admin.rest.generator.ASMResourcesGenerator) EndpointRegistrationException(org.glassfish.api.container.EndpointRegistrationException)

Aggregations

Domain (com.sun.enterprise.config.serverbeans.Domain)1 ASMResourcesGenerator (org.glassfish.admin.rest.generator.ASMResourcesGenerator)1 ResourcesGenerator (org.glassfish.admin.rest.generator.ResourcesGenerator)1 EndpointRegistrationException (org.glassfish.api.container.EndpointRegistrationException)1 Dom (org.jvnet.hk2.config.Dom)1