Count Push Applications

@param pushApplicationID id of {@link PushApplication}
@return                  count number for each {@link org.jboss.aerogear.unifiedpush.api.VariantType}
777781
@GET
    @Path("/{pushAppID}/count")
    @Produces(MediaType.APPLICATION_JSON)
    public Response countInstallations(@PathParam("pushAppID") String pushApplicationID) {

        logger.trace("counting devices by type for push application '{}'", pushApplicationID);
        Map<String, Long> result = pushAppService.countInstallationsByType(pushApplicationID);
        return Response.ok(result).build();
    }
55681
private function setApplicationIfNotSet(IRequest $request)
    {
        // If the 'application' attribute is not set in the request we try to get a default one from the Pushwoosh
        // client
        if ($request->getApplication() === null) {
            // The 'application' must be set
            if (!isset($this->application)) {
                throw new PushwooshException('The  \'application\' property is not set !');
            }

            $request->setApplication($this->application);
        }
    }
420062
public ApplicationSignature getApplicationSignature()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getApplicationSignature");
      SibTr.exit(tc, "getApplicationSignature", applicationSig);
    }
    return applicationSig;
  }
1279090
public void addApplication(App application)
    {
Utility.getLogger().info("addApp: " + application);
        m_vApplication.add(application);
        ((BaseApplication)application).setEnvironment(this);
        if ((m_applicationDefault == null)
                || ((!(m_applicationDefault instanceof MainApplication))) && (application instanceof MainApplication))
            this.setDefaultApplication(application);        // Initialization app
    }
960018
def app_evaluation_count(app_id, value=1):
        '''
        
        '''
        return TabEvaluation.select().where(
            (TabEvaluation.post_id == app_id) & (TabEvaluation.value == value)
        ).count()
139777
func (s *CreateStreamingURLInput) SetApplicationId(v string) *CreateStreamingURLInput {
	s.ApplicationId = &v
	return s
}
1306244
func (s *APNSVoipSandboxChannelResponse) SetApplicationId(v string) *APNSVoipSandboxChannelResponse {
	s.ApplicationId = &v
	return s
}
1151395
func (s *SMSChannelResponse) SetApplicationId(v string) *SMSChannelResponse {
	s.ApplicationId = &v
	return s
}
892601
private Object count(ProceedingJoinPoint pjp, String aProducerId, String aSubsystem, String aCategory) throws Throwable {
		return perform(false,
				getMethodStatName(pjp.getSignature()),
				pjp,
				aProducerId,
				aCategory,
				aSubsystem);
				
	}
1305085
public void initializeAppCounters(String appName) {
 
	    
			if (StatsFactory.isPMIEnabled()) {
				synchronized(this) {
                    appPmi = new WebAppModule (appName, true); // @539186C
                    appPmiState = APP_PMI_WEB; // @539186A
			    }    
			}    
        
    }
660600
public Optional<ApplicationHost> show(long applicationId, long hostId)
    {
        return HTTP.GET(String.format("/v2/applications/%d/hosts/%d.json", applicationId, hostId), APPLICATION_HOST);
    }
899874
func (s *GetApnsVoipSandboxChannelInput) SetApplicationId(v string) *GetApnsVoipSandboxChannelInput {
	s.ApplicationId = &v
	return s
}
952934
func (s *GetApnsSandboxChannelInput) SetApplicationId(v string) *GetApnsSandboxChannelInput {
	s.ApplicationId = &v
	return s
}
239806
@VisibleForTesting
  ApplicationId setupAndSubmitApplication() throws IOException, YarnException {
    YarnClientApplication gobblinYarnApp = this.yarnClient.createApplication();
    ApplicationSubmissionContext appSubmissionContext = gobblinYarnApp.getApplicationSubmissionContext();
    appSubmissionContext.setApplicationType(GOBBLIN_YARN_APPLICATION_TYPE);
    ApplicationId applicationId = appSubmissionContext.getApplicationId();

    GetNewApplicationResponse newApplicationResponse = gobblinYarnApp.getNewApplicationResponse();
    // Set up resource type requirements for ApplicationMaster
    Resource resource = prepareContainerResource(newApplicationResponse);

    // Add lib jars, and jars and files that the ApplicationMaster need as LocalResources
    Map<String, LocalResource> appMasterLocalResources = addAppMasterLocalResources(applicationId);

    ContainerLaunchContext amContainerLaunchContext = Records.newRecord(ContainerLaunchContext.class);
    amContainerLaunchContext.setLocalResources(appMasterLocalResources);
    amContainerLaunchContext.setEnvironment(YarnHelixUtils.getEnvironmentVariables(this.yarnConfiguration));
    amContainerLaunchContext.setCommands(Lists.newArrayList(buildApplicationMasterCommand(resource.getMemory())));
    if (UserGroupInformation.isSecurityEnabled()) {
      setupSecurityTokens(amContainerLaunchContext);
    }

    // Setup the application submission context
    appSubmissionContext.setApplicationName(this.applicationName);
    appSubmissionContext.setResource(resource);
    appSubmissionContext.setQueue(this.appQueueName);
    appSubmissionContext.setPriority(Priority.newInstance(0));
    appSubmissionContext.setAMContainerSpec(amContainerLaunchContext);

    // Also setup container local resources by copying local jars and files the container need to HDFS
    addContainerLocalResources(applicationId);

    // Submit the application
    LOGGER.info("Submitting application " + applicationId);
    this.yarnClient.submitApplication(appSubmissionContext);

    LOGGER.info("Application successfully submitted and accepted");
    ApplicationReport applicationReport = this.yarnClient.getApplicationReport(applicationId);
    LOGGER.info("Application Name: " + applicationReport.getName());
    LOGGER.info("Application Tracking URL: " + applicationReport.getTrackingUrl());
    LOGGER.info("Application User: " + applicationReport.getUser() + " Queue: " + applicationReport.getQueue());

    return applicationId;
  }
922282
@GET
    @Path("/{variantId}/installations/")
    @Produces(MediaType.APPLICATION_JSON)
    @GZIP
    public Response exportInstallations(@PathParam("variantId") String variantId) {
        return Response.ok(getSearch().findAllInstallationsByVariantForDeveloper(variantId, 0, Integer.MAX_VALUE, null).getResultList()).build();
    }
324346
func (s *Version) SetApplicationId(v string) *Version {
	s.ApplicationId = &v
	return s
}
549844
public int addApp(ApplicationCreate app) {
		return getResourceFactory().getApiResource("/app/")
				.entity(app, MediaType.APPLICATION_JSON_TYPE)
				.post(ApplicationCreateResponse.class).getId();
	}