Package com.google.appengine.api.capabilities

Examples of com.google.appengine.api.capabilities.CapabilityState


    /**
     * @return True for not disabled
     */
    protected final static boolean IsAvailable(Capability cap){

        CapabilityState state = GetState(cap);
        CapabilityStatus status = state.getStatus();
        switch(status){
        case DISABLED:
            return false;
        case ENABLED:
        case SCHEDULED_MAINTENANCE:
View Full Code Here


    /**
     * @return Null for not scheduled, or the planned maintenance date
     */
    protected final static java.util.Date GetScheduled(Capability cap){

        CapabilityState state = GetState(cap);
        CapabilityStatus status = state.getStatus();
        switch(status){
        case DISABLED:
        case ENABLED:
            return null;
        case SCHEDULED_MAINTENANCE:
            return state.getScheduledDate();
        default:
            throw new IllegalStateException(status.name());
        }
    }
View Full Code Here

                capability = new Capability(in[0], in[1]);
                p = in[0];
            } else {
                capability = new Capability(p);
            }
            CapabilityState cState = capabilitiesService.getStatus(capability);
            assertEquals(p, cState.getCapability().getPackageName());
            assertEquals(CapabilityStatus.ENABLED, cState.getStatus());
        }
    }
View Full Code Here

    public void testDummyService() {
        // only check this in appserver since everything in dev_appserver has ENABLED status.
        if (SystemProperty.environment.value() == SystemProperty.Environment.Value.Production) {
            String pName = "dummy";
            Capability capability = new Capability(pName);
            CapabilityState cState = capabilitiesService.getStatus(capability);
            assertEquals(pName, cState.getCapability().getPackageName());
            assertEquals(CapabilityStatus.UNKNOWN, cState.getStatus());
        }
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.capabilities.CapabilityState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.