Package org.osgi.service.metatype

Examples of org.osgi.service.metatype.ObjectClassDefinition


    /**
     * @see org.cishell.remoting.service.framework.ObjectClassDefinitionRegistry#getObjectClassDefinition(String)
     */
    public ObjectClassDefinition getObjectClassDefinition(String ocdID) {
        ObjectClassDefinition ocd = (ObjectClassDefinition) registry.getObject(ocdID);
        return ocd == null ? NULL_OCD : ocd;
    }
View Full Code Here


    return this.realMTP.getLocales();
  }

  public ObjectClassDefinition getObjectClassDefinition(String id,
      String locale) {
    ObjectClassDefinition ocd = realMTP.getObjectClassDefinition(id, locale);
    if (ocd != null) {
      return new ParamOCD(realMTP.getObjectClassDefinition(id, locale), defaultOverrider);
    } else {
      return null;
    }
View Full Code Here

    }

    if ((factory instanceof ParameterMutator) && (provider != null)) {
      try {
        ObjectClassDefinition objectClassDefinition = provider
            .getObjectClassDefinition(metatypePID, null);

        if (objectClassDefinition == null) {
          logNullOCDWarning(pid, metatypePID);
        }
View Full Code Here

  protected Map setupIdToLabelMap(String metatype_pid,
      MetaTypeProvider provider) {
    Map idToLabelMap = new HashMap();
    if (provider != null) {
      ObjectClassDefinition ocd = null;
      try {
        ocd = provider.getObjectClassDefinition(metatype_pid, null);

        if (ocd != null) {
          AttributeDefinition[] attr = ocd
              .getAttributeDefinitions(ObjectClassDefinition.ALL);

          for (int i = 0; i < attr.length; i++) {
            String id = attr[i].getID();
            String label = attr[i].getName();
View Full Code Here

        boolean doSimpleMerge = true;
        final MetaTypeServiceSupport mtss = getMetaTypeSupport();
        if ( mtss != null )
        {
            ObjectClassDefinition ocd = null;
            if ( config != null )
            {
                ocd = mtss.getObjectClassDefinition( config, locale );
            }
            if ( ocd == null )
View Full Code Here

                // insert and entry for the PID
                if ( mtss != null )
                {
                    try
                    {
                        ObjectClassDefinition ocd = mtss.getObjectClassDefinition( cfgs[i], locale );
                        if ( ocd != null )
                        {
                            optionsPlain.put( pid, ocd.getName() );
                            continue;
                        }
                    }
                    catch ( IllegalArgumentException t )
                    {
View Full Code Here

                String name = pid;
                boolean haveOcd = !ocdRequired;
                final MetaTypeServiceSupport mtss = getMetaTypeSupport();
                if ( mtss != null )
                {
                    final ObjectClassDefinition ocd = mtss.getObjectClassDefinition( refs[i].getBundle(), pid, locale );
                    if ( ocd != null )
                    {
                        name = ocd.getName();
                        haveOcd = true;
                    }
                }

                if ( haveOcd )
View Full Code Here

        for ( Iterator ei = ocdCollection.entrySet().iterator(); ei.hasNext(); )
        {
            Entry ociEntry = ( Entry ) ei.next();
            final String pid = ( String ) ociEntry.getKey();
            final ObjectClassDefinition ocd = ( ObjectClassDefinition ) ociEntry.getValue();
            if ( filter == null )
            {
                pidMap.put( pid, ocd.getName() );
            }
            else
            {
                final Dictionary props = new Hashtable();
                props.put( type, pid );
                if ( filter.match( props ) )
                {
                    pidMap.put( pid, ocd.getName() );
                }
            }
        }
    }
View Full Code Here

                "How long a lock is held before releasing due to suspected deadlock",
                AttributeDefinition.LONG,
                new String[] { String.valueOf(this.getScrConfiguration().lockTimeout())},
                0, null, null) );

        return new ObjectClassDefinition()
        {

            private final AttributeDefinition[] attrs = adList
                .toArray(new AttributeDefinition[adList.size()]);
View Full Code Here

            if (ocdRef == null || "".equals(ocdRef)) {
                throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "Object ocdRef attribute missing or invalid");
            }

            // determine OCD
            ObjectClassDefinition ocd = null;
            OCD localOcd = (OCD) localOcds.get(ocdRef);
            // ask meta type service for matching OCD if no local OCD has been defined
            ocd = (localOcd != null) ? new ObjectClassDefinitionImpl(localOcd) : getMetaTypeOCD(data, designate);
            if (ocd == null) {
                throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "No Object Class Definition found with id=" + ocdRef);
View Full Code Here

TOP

Related Classes of org.osgi.service.metatype.ObjectClassDefinition

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.