Examples of Dependency


Examples of net.sourceforge.javautil.dependency.annotation.Dependency

    for (String name : fields.keySet()) {
      for (ClassField field : fields.get(name)) {
        if (!IManaged.class.isAssignableFrom( field.getBaseType() )) continue;
       
        for (Annotation annotation : field.getAnnotations()) {
          Dependency dependency = annotation.annotationType().getAnnotation(Dependency.class);
          if (dependency != null) {
            field.ensureAccessibility();
            manager.relate(managed, (M) field.getValue(managed), dependency.strategy());
          }
        }
      }
    }
   
View Full Code Here

Examples of net.xeoh.plugins.base.impl.registry.PluggableClassMetaInformation.Dependency

            // Don't recognize optional fields as dependencies.
            if (ipannotation.isOptional()) continue;

            // Obtain capabilities                        

            final Dependency d = new Dependency();
            d.capabilites = ipannotation.requiredCapabilities();
            d.pluginClass = (Class<? extends Plugin>) field.getType();
            d.isOptional = ipannotation.isOptional();

            rval.add(d);
View Full Code Here

Examples of net.xeoh.plugins.base.impl.registry.PluginClassMetaInformation.Dependency

           
            final InjectPlugin ipannotation = field.getAnnotation(InjectPlugin.class);
            if (ipannotation == null) continue;
            if (ipannotation.isOptional()) continue;

            final Dependency d = new Dependency();
            d.capabilites = ipannotation.requiredCapabilities();
            d.pluginClass = (Class<? extends Plugin>) getTrueDependencyInterfaceType(field.getType());
            d.isOptional = ipannotation.isOptional();

            rval.add(d);
        }
       
        // And setter methods as well (aka Scala hack)
        for (Method method : methods) {
            method.setAccessible(true);
           
            final InjectPlugin ipannotation = method.getAnnotation(InjectPlugin.class);
            if (ipannotation == null) continue;
            if (ipannotation.isOptional()) continue;


            final Dependency d = new Dependency();
            d.capabilites = ipannotation.requiredCapabilities();
            d.pluginClass = (Class<? extends Plugin>) getTrueDependencyInterfaceType(method.getParameterTypes()[0]);
            d.isOptional = ipannotation.isOptional();

            rval.add(d);
View Full Code Here

Examples of org.apache.archiva.metadata.model.Dependency

        License l = new License();
        l.setName( "license name" );
        l.setUrl( "license url" );
        metadata.addLicense( l );

        Dependency d = new Dependency();
        d.setArtifactId( "artifactId" );
        d.setClassifier( "classifier" );
        d.setGroupId( "groupId" );
        d.setScope( "scope" );
        d.setSystemPath( "system path" );
        d.setType( "type" );
        d.setVersion( "version" );
        d.setOptional( true );
        metadata.addDependency( d );

        repository.updateProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, metadata );

        metadata = repository.getProjectVersion( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION );
        assertEquals( TEST_PROJECT_VERSION, metadata.getId() );
        assertEquals( TEST_PROJECT_VERSION, metadata.getVersion() );
        assertEquals( "project name", metadata.getName() );
        assertEquals( "project description", metadata.getDescription() );

        assertEquals( 1, metadata.getMailingLists().size() );
        mailingList = metadata.getMailingLists().get( 0 );
        assertEquals( "Foo List", mailingList.getName() );
        assertEquals( Collections.singletonList( "other archive" ), mailingList.getOtherArchives() );

        assertEquals( "connection", metadata.getScm().getConnection() );
        assertEquals( "dev conn", metadata.getScm().getDeveloperConnection() );
        assertEquals( "url", metadata.getScm().getUrl() );

        assertEquals( "system", metadata.getCiManagement().getSystem() );
        assertEquals( "ci url", metadata.getCiManagement().getUrl() );

        assertEquals( "system", metadata.getIssueManagement().getSystem() );
        assertEquals( "issue tracker url", metadata.getIssueManagement().getUrl() );

        assertEquals( "org name", metadata.getOrganization().getName() );
        assertEquals( "url", metadata.getOrganization().getUrl() );

        assertEquals( 1, metadata.getLicenses().size() );
        l = metadata.getLicenses().get( 0 );
        assertEquals( "license name", l.getName() );
        assertEquals( "license url", l.getUrl() );

        assertEquals( 1, metadata.getDependencies().size() );
        d = metadata.getDependencies().get( 0 );
        assertEquals( "artifactId", d.getArtifactId() );
        assertEquals( "classifier", d.getClassifier() );
        assertEquals( "groupId", d.getGroupId() );
        assertEquals( "scope", d.getScope() );
        assertEquals( "system path", d.getSystemPath() );
        assertEquals( "type", d.getType() );
        assertEquals( "version", d.getVersion() );
        assertTrue( d.isOptional() );
    }
View Full Code Here

Examples of org.apache.archiva.web.xmlrpc.api.beans.Dependency

                {
                    List<Dependency> dependencies = new ArrayList<Dependency>();
                    List<org.apache.archiva.metadata.model.Dependency> modelDeps = model.getDependencies();
                    for ( org.apache.archiva.metadata.model.Dependency dep : modelDeps )
                    {
                        Dependency dependency = new Dependency( dep.getGroupId(), dep.getArtifactId(), dep.getVersion(),
                                                                dep.getClassifier(), dep.getType(), dep.getScope() );
                        dependencies.add( dependency );
                    }
                    return dependencies;
                }
View Full Code Here

Examples of org.apache.derby.iapi.sql.depend.Dependency

    {
      DependencyManager dmgr = lcc.getDataDictionary().getDependencyManager();

      for (Iterator iterator = dependencies.iterator(); iterator.hasNext(); )
      {
        Dependency dy = (Dependency) iterator.next();
        dmgr.clearInMemoryDependency(dy);
      }

      dependencies = null;
    }
View Full Code Here

Examples of org.apache.derby.iapi.sql.depend.Dependency

  private void addDependency(Dependent d, Provider p, ContextManager cm,
      TransactionController tc) throws StandardException {

    synchronized(this)
    {
      Dependency dy = new BasicDependency(d, p);

      /* Dependencies are either in-memory or stored, but not both */
      if (! d.isPersistent() || ! p.isPersistent())
      {
        /* Duplicate dependencies are not added to the lists.
View Full Code Here

Examples of org.apache.derby.iapi.sql.depend.Dependency

      // entries from this list.
      for (int ei = list.size() - 1; ei >= 0; ei--)
      {
        if (ei >= list.size())
          continue;
        Dependency dependency = (Dependency) list.get(ei);

        Dependent dep = dependency.getDependent();

        if (affectedCols != null)
        {
          TableDescriptor td = (TableDescriptor) dependency.getProvider();
          FormatableBitSet providingCols = td.getReferencedColumnMap();
          if (providingCols == null)
          {
            if (dep instanceof ViewDescriptor)
            {
View Full Code Here

Examples of org.apache.derby.iapi.sql.depend.Dependency

      // go through the list notifying providers to remove
      // the dependency from their lists
      for (ListIterator depsIterator = deps.listIterator();
        depsIterator.hasNext(); ) {

        Dependency dy = (Dependency)depsIterator.next();
        clearProviderDependency(dy.getProviderKey(), dy);
      }

      dependents.remove(d.getObjectID());
    }
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.depend.Dependency

    java.util.ArrayList pih = new java.util.ArrayList();

    for (ListIterator depsIterator = list.listIterator();
          depsIterator.hasNext(); )
    {
      Dependency dep = (Dependency) depsIterator.next();

      if (dep.getProvider().isPersistent())
      {
        pih.add(new BasicProviderInfo(
                  dep.getProvider().getObjectID(),
                  dep.getProvider().getDependableFinder(),
                  dep.getProvider().getObjectName()
                  ));
      }
    }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.