API_GetAppDTMInfo
974297
def getAppDTMInfo( dbid )
      @dbid = dbid

      sendRequest( :getAppDTMInfo )

      @requestTime = getResponseElement( "RequestTime" )
      @requestNextAllowedTime = getResponseElement( "RequestNextAllowedTime" )
      @app = getResponseElement( "app" )
      @lastModifiedTime = getResponsePathValue( "app/lastModifiedTime" )
      @lastRecModTime = getResponsePathValue( "app/lastRecModTime" )
      @tables = getResponseElement( :tables )

      return self if @chainAPIcalls

      if @app and @tables and block_given?
         @app.each { |element| yield element }
         @tables.each { |element| yield element }
      else
         return @app, @tables
      end
   end
426926
public Maybe<ApplicationInfo> getApplicationInfo(String clientId) {
        return db.findClientCredentials(clientId).map(creds -> {
            ApplicationInfo appInfo = null;
            if (creds != null) {
                appInfo = ApplicationInfo.loadFromClientCredentials(creds);
            }
            return appInfo;
        });
    }
1367295
function() {
  // Get list of dirs from app registry.
  return getAppRegistry()
  // Map app dirs to app names.
  .then(inspectDirs)
  .all()
  .tap(function(appRegistryApps) {
    log.debug(format('Apps in registry: %j', appRegistryApps));
  });

}
140993
public ProcessApplicationInfo getProcessApplicationInfo(String processApplicationName) {
    MscManagedProcessApplication managedProcessApplication = getManagedProcessApplication(processApplicationName);

    if (managedProcessApplication == null) {
      return null;
    }
    else {
      return managedProcessApplication.getProcessApplicationInfo();
    }
  }
643189
private ApplicationDefinition checkApplicationKey(ApplicationDefinition appDef) {
        Tenant tenant = Tenant.getTenant(appDef);
        ApplicationDefinition currAppDef = getApplication(tenant, appDef.getAppName());
        if (currAppDef == null) {
            m_logger.info("Defining application: {}", appDef.getAppName());
        } else {
            m_logger.info("Updating application: {}", appDef.getAppName());
            String appKey = currAppDef.getKey();
            Utils.require(Utils.isEmpty(appKey) || appKey.equals(appDef.getKey()),
                          "Application key cannot be changed: %s", appDef.getKey());
        }
        return currAppDef;
    }
43417
def info(self):
        """"""

        return self._h._get_resource(
            resource=('apps', self.name),
            obj=App,
        )
910569
def get_meminfo(opts):
    ''' 
    '''
    meminfo = MemInfo()
    outunit = opts.outunit
    mstat = get_mem_info()  # from winstats
    pinf = get_perf_info()
    try:
        pgpcnt = get_perf_data(r'\Paging File(_Total)\% Usage',
                                'double')[0] / 100
    except WindowsError:
        pgpcnt = 0

    totl = mstat.TotalPhys
    meminfo.memtotal = totl / float(outunit)
    used = totl * mstat.MemoryLoad / 100.0  # percent, more reliable
    meminfo.used = used / float(outunit)
    left = totl - used

    # Cached
    cache = pinf.SystemCacheBytes
    if cache > left and version >= win7ver:
        # Win7 RTM bug :/ this cache number is bogus
        free = get_perf_data(r'\Memory\Free & Zero Page List Bytes', 'long')[0]
        cache = left - free
        meminfo.memfree = free / float(outunit)
    else:
        meminfo.memfree = (totl - used - cache) / float(outunit)
    meminfo.buffers = 0

    meminfo.cached = cache / float(outunit)

    # SWAP  these numbers are actually commit charge, not swap; fix
    #       should not contain RAM :/
    swpt = abs(mstat.TotalPageFile - totl)
    # these nums aren't quite right either, use perfmon instead :/
    swpu = swpt * pgpcnt
    swpf = swpt - swpu

    meminfo.swaptotal = swpt / float(outunit)
    meminfo.swapfree = swpf / float(outunit)
    meminfo.swapused = swpu / float(outunit)
    meminfo.swapcached = 0  # A linux stat for compat

    if opts.debug:
        import locale
        fmt = lambda val: locale.format('%d', val, True)
        print()
        print('TotalPhys:', fmt(totl))
        print('AvailPhys:', fmt(mstat.AvailPhys))
        print('MemoryLoad:', fmt(mstat.MemoryLoad))
        print()
        print('used:', fmt(used))
        print('left:', fmt(left))
        if 'free' in locals():
            print('PDH Free:', fmt(free))
        print('SystemCacheBytes:', fmt(pinf.SystemCacheBytes))
        print()
        print('TotalPageFile:', fmt(mstat.TotalPageFile))
        print('AvailPageFile:', fmt(mstat.AvailPageFile))
        print('TotalPageFile fixed:', fmt(swpt))
        print('AvailPageFile fixed:', fmt(swpf))

    return meminfo
145415
def get_app_name(app_name):
    
    type_ = locate(app_name)
    if inspect.isclass(type_):
        return type_.name
    return app_name
1291629
def get_application_info(self, limit=10, offset=10):
        
        params = {}
        if offset:
            params['offset'] = offset
        if limit:
            params['limit'] = limit
        url = 'rest/2/applications'
        return self.get(url, params=params)
1315710
def getApplications(self):
        """"""

        res = []
        for f in self.features:
            if isinstance(f, Feature) and f.prop == "disk.0.applications":
                res.append(FeaturesApp(f.value.features))

        return res
430976
def get_current_app(self):
        """"""
        self.request(EP_GET_CURRENT_APP_INFO)
        return None if self.last_response is None else self.last_response.get('payload').get('appId')
748394
@Override
    public void applicationStopped(ApplicationInfo appInfo) {
        Application application = this.runtimeFactory.removeApplication(appInfo);
        /* ignore apps not controlled by the app manager */
        if (application == null) {
            return;
        }
        try {
            getCDIContainer().applicationStopped(application);
        } catch (CDIException e) {
            //FFDC and carry on
        } finally { 
            try {
                for (CDIArchive archive : application.getModuleArchives()) {
                    DeferredMetaDataFactory metaDataFactory = deferredMetaDataFactoryRef.getService();
                    CDIDeferredMetaDataFactoryImpl cdiMetaDataFactory = (CDIDeferredMetaDataFactoryImpl) metaDataFactory;
                    cdiMetaDataFactory.removeComponentMetaData(archive);
                }
            } catch (CDIException e) {
                //FFDC and carry on
            }
        }
    }
1159862
public ChatRoomListResult getAppChatRoomInfo(int start, int count)
            throws APIConnectionException, APIRequestException {
        return _chatRoomClient.getAppChatRoomInfo(start, count);
    }
1272759
function readAppInfo(buf) {
  // First byte varies across installs, only the 2nd and 3rd seem consistent
  if (buf.readUInt8(1) != 0x44 || buf.readUInt8(2) != 0x56)
    throw new Error('Invalid file signature')

  return readAppEntries(buf.slice(8))
}
675722
public static function getApplicationName():?string
    {
        if (self::isCliApp()) {
            return self::$APPLICATION_NAME;
        }

        return MSession::get(MCoreApplication::APPLICATION_NAME);
    }
417069
public static String getAppName() {
		String appName=System.getProperty(JKContextConstants.JK_APP_NAME);
		if (appName == null) {
			String mainClassName = JKDebugUtil.getMainClassName();
			return mainClassName.substring(0, mainClassName.lastIndexOf("."));
		}
		return appName;
	}
1315412
private String getApiIndex(Api api) {
        return getApiIndex(api.getOrganizationId(), api.getApiId(), api.getVersion());
    }