org.osgi.framework.InvalidSyntaxException源码实例Demo

java.util.EmptyStackException#org.osgi.framework.InvalidSyntaxException源码实例Demo

下面列出了java.util.EmptyStackException#org.osgi.framework.InvalidSyntaxException 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: gvnix   文件: JQueryOperationsImpl.java
public WebMetadataService getWebMetadataService() {
    if (webMetadataService == null) {
        // Get all Services implement WebMetadataService interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            WebMetadataService.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (WebMetadataService) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load WebMetadataService on JQueryOperationsImpl.");
            return null;
        }
    }
    else {
        return webMetadataService;
    }
}
 
源代码2 项目: gvnix   文件: DatatablesJspMetadataListener.java
public MetadataDependencyRegistry getMetadataDependencyRegistry() {
    if (metadataDependencyRegistry == null) {
        // Get all Services implement MetadataDependencyRegistry interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            MetadataDependencyRegistry.class.getName(),
                            null);

            for (ServiceReference<?> ref : references) {
                return (MetadataDependencyRegistry) this.context
                        .getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load MetadataDependencyRegistry on DatatablesJspMetadataListener.");
            return null;
        }
    }
    else {
        return metadataDependencyRegistry;
    }
}
 
源代码3 项目: gvnix   文件: MonitoringOperationsImpl.java
public TypeManagementService getTypeManagementService() {
    if (typeManagementService == null) {
        // Get all Services implement TypeManagementService interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            TypeManagementService.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (TypeManagementService) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load TypeManagementService on MonitoringOperationsImpl.");
            return null;
        }
    }
    else {
        return typeManagementService;
    }

}
 
源代码4 项目: gvnix   文件: WebProjectUtilsImpl.java
public OperationUtils getOperationUtils() {
    if (operationUtils == null) {
        // Get all Services implement OperationUtils interface
        try {
            ServiceReference<?>[] references = context
                    .getAllServiceReferences(
                            OperationUtils.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                operationUtils = (OperationUtils) context.getService(ref);
                return operationUtils;
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load OperationUtils on WebProjectUtilsImpl.");
            return null;
        }
    }
    else {
        return operationUtils;
    }

}
 
源代码5 项目: gvnix   文件: ReportMetadataProvider.java
public ProjectOperations getProjectOperations() {
    if (projectOperations == null) {
        // Get all Services implement ProjectOperations interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            ProjectOperations.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (ProjectOperations) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            logger.warning("Cannot load ProjectOperations on ReportMetadataProvider.");
            return null;
        }
    }
    else {
        return projectOperations;
    }

}
 
源代码6 项目: gvnix   文件: MessageBundleUtilsImpl.java
public WebProjectUtils getWebProjectUtils() {
    if (webProjectUtils == null) {
        // Get all Services implement WebProjectUtils interface
        try {
            ServiceReference<?>[] references = context
                    .getAllServiceReferences(
                            WebProjectUtils.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                webProjectUtils = (WebProjectUtils) context.getService(ref);
                return webProjectUtils;
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load WebProjectUtils on MessageBundleUtilsImpl.");
            return null;
        }
    }
    else {
        return webProjectUtils;
    }

}
 
源代码7 项目: gvnix   文件: BootstrapOperationsImpl.java
public MetadataService getMetadataService() {
    if (metadataService == null) {
        // Get all Services implement MetadataService interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            MetadataService.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (MetadataService) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load MetadataService on BootstrapOperationsImpl.");
            return null;
        }
    }
    else {
        return metadataService;
    }
}
 
源代码8 项目: gvnix   文件: MonitoringOperationsImpl.java
public ProjectOperations getProjectOperations() {
    if (projectOperations == null) {
        // Get all Services implement ProjectOperations interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            ProjectOperations.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (ProjectOperations) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load ProjectOperations on MonitoringOperationsImpl.");
            return null;
        }
    }
    else {
        return projectOperations;
    }

}
 
源代码9 项目: knopflerfish.org   文件: NativeRequirement.java
private Filter toFilter(List<String> procs, List<String> oses, List<VersionRange> vers, List<String> langs, String sf)
  throws InvalidSyntaxException
{
  final StringBuffer sb = new StringBuffer(80);
  int elems = 0;
  
  elems = andAdd(sb, orString(NativeNamespace.CAPABILITY_PROCESSOR_ATTRIBUTE, procs));
  elems += andAdd(sb, orString(NativeNamespace.CAPABILITY_OSNAME_ATTRIBUTE, oses));
  elems += andAdd(sb, orString(NativeNamespace.CAPABILITY_OSVERSION_ATTRIBUTE, vers));
  elems += andAdd(sb, orString(NativeNamespace.CAPABILITY_LANGUAGE_ATTRIBUTE, langs));
  elems += andAdd(sb, sf);
  if (elems == 0) {
    return null;
  } else if (elems > 1) {
    sb.insert(0,"(&");
    sb.append(")");
  }
  return FrameworkUtil.createFilter(sb.toString());
}
 
源代码10 项目: gvnix   文件: ReportJspMetadataListener.java
public PathResolver getPathResolver() {
    if (pathResolver == null) {
        // Get all Services implement PathResolver interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(PathResolver.class.getName(),
                            null);

            for (ServiceReference<?> ref : references) {
                return (PathResolver) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load PathResolver on ReportJspMetadataListener.");
            return null;
        }
    }
    else {
        return pathResolver;
    }

}
 
源代码11 项目: gvnix   文件: JQueryOperationsImpl.java
public MvcOperations getMvcOperations() {
    if (mvcOperations == null) {
        // Get all Services implement MvcOperations interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(MvcOperations.class.getName(),
                            null);

            for (ServiceReference<?> ref : references) {
                return (MvcOperations) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load MvcOperations on JQueryOperationsImpl.");
            return null;
        }
    }
    else {
        return mvcOperations;
    }
}
 
源代码12 项目: gvnix   文件: DependencyListenerImpl.java
public ProjectOperations getProjectOperations() {
    if (projectOperations == null) {
        // Get all Services implement ProjectOperations interface
        try {
            ServiceReference[] references = context
                    .getAllServiceReferences(
                            ProjectOperations.class.getName(), null);

            for (ServiceReference ref : references) {
                projectOperations = (ProjectOperations) context
                        .getService(ref);
                return projectOperations;
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load ProjectOperations on DependencyListenerImpl.");
            return null;
        }
    }
    else {
        return projectOperations;
    }
}
 
源代码13 项目: gvnix   文件: BootstrapOperationsImpl.java
public PathResolver getPathResolver() {
    if (pathResolver == null) {
        // Get all Services implement PathResolver interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(PathResolver.class.getName(),
                            null);

            for (ServiceReference<?> ref : references) {
                return (PathResolver) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load PathResolver on BootstrapOperationsImpl.");
            return null;
        }
    }
    else {
        return pathResolver;
    }
}
 
源代码14 项目: neoscada   文件: PullManager.java
public PullManager () throws InvalidSyntaxException
{
    final String driver = DataSourceHelper.getDriver ( SPECIFIC_PREFIX, DataSourceHelper.DEFAULT_PREFIX );
    this.tracker = new DataSourceFactoryTracker ( Activator.getContext (), driver, null );

    if ( driver == null )
    {
        logger.error ( "JDBC driver is not set" );
        throw new IllegalStateException ( "JDBC driver name is not set" );
    }

    this.tracker.open ();

    this.thread = new Thread ( "org.eclipse.scada.ae.slave.pull.Worker" ) {
        @Override
        public void run ()
        {
            PullManager.this.run ();
        }
    };
    this.thread.start ();
}
 
源代码15 项目: gvnix   文件: MonitoringOperationsImpl.java
public PathResolver getPathResolver() {
    if (pathResolver == null) {
        // Get all Services implement PathResolver interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(PathResolver.class.getName(),
                            null);

            for (ServiceReference<?> ref : references) {
                return (PathResolver) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load PathResolver on MonitoringOperationsImpl.");
            return null;
        }
    }
    else {
        return pathResolver;
    }

}
 
源代码16 项目: gvnix   文件: JpaGeoOperationsImpl.java
public FileManager getFileManager() {
    if (fileManager == null) {
        // Get all Services implement FileManager interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(FileManager.class.getName(),
                            null);

            for (ServiceReference<?> ref : references) {
                return (FileManager) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load FileManager on JpaGeoOperationsImpl.");
            return null;
        }
    }
    else {
        return fileManager;
    }

}
 
源代码17 项目: gvnix   文件: MonitoringOperationsImpl.java
public TypeLocationService getTypeLocationService() {
    if (typeLocationService == null) {
        // Get all Services implement TypeLocationService interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            TypeLocationService.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (TypeLocationService) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load TypeLocationService on MonitoringOperationsImpl.");
            return null;
        }
    }
    else {
        return typeLocationService;
    }

}
 
源代码18 项目: gvnix   文件: WSImportMetadataProvider.java
public ProjectOperations getProjectOperations() {
    if (projectOperations == null) {
        // Get all Services implement ProjectOperations interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            ProjectOperations.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (ProjectOperations) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load ProjectOperations on WSImportMetadataProvider.");
            return null;
        }
    }
    else {
        return projectOperations;
    }
}
 
源代码19 项目: gvnix   文件: DependencyListenerImpl.java
public GeoOperations getGeoOperations() {
    if (operations == null) {
        // Get all Services implement GeoOperations interface
        try {
            ServiceReference[] references = context
                    .getAllServiceReferences(GeoOperations.class.getName(),
                            null);

            for (ServiceReference ref : references) {
                operations = (GeoOperations) context.getService(ref);
                return operations;
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load GeoOperations on DependencyListenerImpl.");
            return null;
        }
    }
    else {
        return operations;
    }
}
 
源代码20 项目: knopflerfish.org   文件: BundleLocationCondition.java
/**
 * Constructs a condition that tries to match the passed Bundle's location
 * to the location pattern.
 * 
 * @param bundle The Bundle being evaluated.
 * @param info The ConditionInfo from which to construct the condition. The
 *        ConditionInfo must specify one or two arguments. The first
 *        argument of the ConditionInfo specifies the location pattern
 *        against which to match the bundle location. Matching is done
 *        according to the filter string matching rules. Any '*' characters
 *        in the first argument are used as wildcards when matching bundle
 *        locations unless they are escaped with a '\' character. The
 *        Condition is satisfied if the bundle location matches the pattern.
 *        The second argument of the ConditionInfo is optional. If a second
 *        argument is present and equal to "!", then the satisfaction of the
 *        Condition is negated. That is, the Condition is satisfied if the
 *        bundle location does NOT match the pattern. If the second argument
 *        is present but does not equal "!", then the second argument is
 *        ignored.
 * @return Condition object for the requested condition.
 */
static public Condition getCondition(final Bundle bundle, final ConditionInfo info) {
	if (!CONDITION_TYPE.equals(info.getType()))
		throw new IllegalArgumentException("ConditionInfo must be of type \"" + CONDITION_TYPE + "\"");
	String[] args = info.getArgs();
	if (args.length != 1 && args.length != 2)
		throw new IllegalArgumentException("Illegal number of args: " + args.length);
	String bundleLocation = AccessController.doPrivileged(new PrivilegedAction<String>() {
		public String run() {
			return bundle.getLocation();
		}
	});
	Filter filter = null;
	try {
		filter = FrameworkUtil.createFilter("(location=" + escapeLocation(args[0]) + ")");
	} catch (InvalidSyntaxException e) {
		// this should never happen, but just in case
		throw new RuntimeException("Invalid filter: " + e.getFilter(), e);
	}
	Dictionary<String, String> matchProps = new Hashtable<String, String>(2);
	matchProps.put("location", bundleLocation);
	boolean negate = (args.length == 2) ? "!".equals(args[1]) : false;
	return (negate ^ filter.match(matchProps)) ? Condition.TRUE : Condition.FALSE;
}
 
@Override
public ScriptEngine getScriptEngineForLanguage(String language) {
   ScriptEngine scriptEngine = null;
   try {
     scriptEngine = resolveScriptEngine(language);
   } catch (InvalidSyntaxException e) {
     throw new ProcessEngineException(
         "problem resolving scripting engine" + e.getMessage(), e);
   }

   if (scriptEngine == null) {
     throw new ProcessEngineException(
         "Can't find scripting engine for '" + language + "'");
   }
   return scriptEngine;
}
 
源代码22 项目: knopflerfish.org   文件: LDAPQuery.java
void doQuery() throws InvalidSyntaxException {
    if (tail.length() < 3 || !prefix("("))
        error(MALFORMED);

    switch (tail.charAt(0)) {
    case '&':
        doAnd();
        break;
    case '|':
        doOr();
        break;
    case '!':
        doNot();
        break;
    default:
        doSimple();
        break;
    }

    if (!prefix(")"))
        error(MALFORMED);
}
 
源代码23 项目: gvnix   文件: DatatablesOperationsImpl.java
public I18nSupport getI18nSupport() {
    if (i18nSupport == null) {
        // Get all Services implement I18nSupport interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(I18nSupport.class.getName(),
                            null);

            for (ServiceReference<?> ref : references) {
                return (I18nSupport) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load I18nSupport on DatatablesOperationsImpl.");
            return null;
        }
    }
    else {
        return i18nSupport;
    }
}
 
源代码24 项目: gvnix   文件: ReportMetadataProvider.java
public WebMetadataService getWebMetadataService() {
    if (webMetadataService == null) {
        // Get all Services implement WebMetadataService interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            WebMetadataService.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (WebMetadataService) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            logger.warning("Cannot load WebMetadataService on ReportMetadataProvider.");
            return null;
        }
    }
    else {
        return webMetadataService;
    }

}
 
源代码25 项目: gvnix   文件: WSExportMetadataProvider.java
public WSConfigService getWSConfigService() {
    if (wSConfigService == null) {
        // Get all Services implement WSConfigService interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            WSConfigService.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (WSConfigService) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load WSConfigService on WSExportMetadataProvider.");
            return null;
        }
    }
    else {
        return wSConfigService;
    }
}
 
源代码26 项目: neoscada   文件: MovingAverageDataSource.java
private void updateDataSource () throws InvalidSyntaxException
{
    logger.debug ( "updateDataSource ()" );
    if ( this.dataSourceTracker != null )
    {
        this.dataSourceTracker.close ();
        this.dataSourceTracker = null;
    }
    if ( this.dataSourceId != null )
    {
        logger.debug ( "track datasource {}", this.dataSourceId );
        this.dataSourceTracker = new SingleDataSourceTracker ( this.poolTracker, this.dataSourceId, new ServiceListener () {
            @Override
            public void dataSourceChanged ( final DataSource dataSource )
            {
                setDataSource ( dataSource );
            }
        } );
        this.dataSourceTracker.open ();
    }
}
 
源代码27 项目: neoscada   文件: ConnectionTracker.java
protected Filter createFilter ()
{
    try
    {
        Class<?> filterClazz;
        if ( this.clazz != null )
        {
            filterClazz = this.clazz;
        }
        else
        {
            filterClazz = ConnectionService.class;
        }

        return FilterUtil.createAndFilter ( filterClazz.getName (), createFilterParameters () );
    }
    catch ( final InvalidSyntaxException e )
    {
        logger.warn ( "Failed to create filter", e );
        return null;
    }
}
 
源代码28 项目: AtlasForAndroid   文件: BundleContextImpl.java
public ServiceReference[] getServiceReferences(String str, String str2) throws InvalidSyntaxException {
    Collection collection;
    checkValid();
    Filter fromString = RFC1960Filter.fromString(str2);
    if (str == null) {
        collection = Framework.services;
    } else {
        List list = (List) Framework.classes_services.get(str);
        if (list == null) {
            return null;
        }
    }
    List arrayList = new ArrayList();
    ServiceReferenceImpl[] serviceReferenceImplArr = (ServiceReferenceImpl[]) collection.toArray(new ServiceReferenceImpl[collection.size()]);
    for (int i = 0; i < serviceReferenceImplArr.length; i++) {
        if (fromString.match(serviceReferenceImplArr[i])) {
            arrayList.add(serviceReferenceImplArr[i]);
        }
    }
    if (Framework.DEBUG_SERVICES && log.isInfoEnabled()) {
        log.info("Framework: REQUESTED SERVICES " + str + " " + str2);
        log.info("\tRETURNED " + arrayList);
    }
    return arrayList.size() == 0 ? null : (ServiceReference[]) arrayList.toArray(new ServiceReference[arrayList.size()]);
}
 
源代码29 项目: gvnix   文件: DatatablesOperationsImpl.java
public WebMvcOperations getWebMvcOperations() {
    if (webMvcOperations == null) {
        // Get all Services implement WebMvcOperations interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            WebMvcOperations.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                return (WebMvcOperations) this.context.getService(ref);
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load WebMvcOperations on DatatablesOperationsImpl.");
            return null;
        }
    }
    else {
        return webMvcOperations;
    }
}
 
源代码30 项目: gvnix   文件: MenuEntryOperationsImpl.java
public WebProjectUtils getWebProjectUtils() {
    if (webProjectUtils == null) {
        // Get all Services implement WebProjectUtils interface
        try {
            ServiceReference<?>[] references = this.context
                    .getAllServiceReferences(
                            WebProjectUtils.class.getName(), null);

            for (ServiceReference<?> ref : references) {
                webProjectUtils = (WebProjectUtils) this.context
                        .getService(ref);
                return webProjectUtils;
            }

            return null;

        }
        catch (InvalidSyntaxException e) {
            LOGGER.warning("Cannot load WebProjectUtils on MenuEntryOperationsImpl.");
            return null;
        }
    }
    else {
        return webProjectUtils;
    }
}