当前位置: 首页>>代码示例>>Java>>正文


Java Repository类代码示例

本文整理汇总了Java中org.springframework.roo.project.Repository的典型用法代码示例。如果您正苦于以下问题:Java Repository类的具体用法?Java Repository怎么用?Java Repository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Repository类属于org.springframework.roo.project包,在下文中一共展示了Repository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addAnnotations

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * Add addon repository and dependency to get annotations.
 * 
 * @param configuration Configuration element
 */
private void addAnnotations(Element configuration) {

    // Install the add-on Google code repository and dependency needed to
    // get the annotations

    List<Element> repos = XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", configuration);
    for (Element repo : repos) {

        projectOperations.addRepository(projectOperations
                .getFocusedModuleName(), new Repository(repo));
    }

    List<Element> depens = XmlUtils.findElements(
            "/configuration/gvnix/dependencies/dependency", configuration);

    DependenciesVersionManager.manageDependencyVersion(metadataService,
            projectOperations, depens);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:25,代码来源:WebScreenConfigServiceImpl.java

示例2: setup

import org.springframework.roo.project.Repository; //导入依赖的package包/类
public void setup() {
    // Get add-on configuration file
    Element configuration = XmlUtils.getConfiguration(getClass());

    // Install the add-on repository needed
    List<Element> repos = XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", configuration);
    for (Element repo : repos) {
        getProjectOperations().addRepositories(
                getProjectOperations().getFocusedModuleName(),
                Collections.singleton(new Repository(repo)));
    }

    // Install dependencies
    List<Element> depens = XmlUtils.findElements(
            "/configuration/gvnix/dependencies/dependency", configuration);

    DependenciesVersionManager.manageDependencyVersion(
            getMetadataService(), getProjectOperations(), depens);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:21,代码来源:MvcOperationsImpl.java

示例3: updateConfiguration

import org.springframework.roo.project.Repository; //导入依赖的package包/类
private void updateConfiguration() {
    final Element configuration = XmlUtils.getConfiguration(getClass());
    final String focusedModuleName = projectOperations
            .getFocusedModuleName();

    final List<Dependency> dependencyElements = new ArrayList<Dependency>();
    for (final Element webFlowDependencyElement : XmlUtils.findElements(
            "/configuration/springWebFlow/dependencies/dependency",
            configuration)) {
        dependencyElements.add(new Dependency(webFlowDependencyElement));
    }
    projectOperations
            .addDependencies(focusedModuleName, dependencyElements);

    final List<Repository> repositoryElements = new ArrayList<Repository>();
    for (final Element repositoryElement : XmlUtils.findElements(
            "/configuration/springWebFlow/repositories/repository",
            configuration)) {
        repositoryElements.add(new Repository(repositoryElement));
    }
    projectOperations
            .addRepositories(focusedModuleName, repositoryElements);

    projectOperations.updateProjectType(focusedModuleName, ProjectType.WAR);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:26,代码来源:WebFlowOperationsImpl.java

示例4: manageDependencies

import org.springframework.roo.project.Repository; //导入依赖的package包/类
private void manageDependencies(final String moduleName) {
    final Element configuration = XmlUtils.getConfiguration(getClass());

    final List<Dependency> dependencies = new ArrayList<Dependency>();
    final List<Element> springDependencies = XmlUtils.findElements(
            "/configuration/spring-data-mongodb/dependencies/dependency",
            configuration);
    for (final Element dependencyElement : springDependencies) {
        dependencies.add(new Dependency(dependencyElement));
    }

    final List<Repository> repositories = new ArrayList<Repository>();
    final List<Element> repositoryElements = XmlUtils.findElements(
            "/configuration/spring-data-mongodb/repositories/repository",
            configuration);
    for (final Element repositoryElement : repositoryElements) {
        repositories.add(new Repository(repositoryElement));
    }

    getProjectOperations().addRepositories(moduleName, repositories);
    getProjectOperations().addDependencies(moduleName, dependencies);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:23,代码来源:MongoOperationsImpl.java

示例5: addAddonDependency

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public void addAddonDependency() {

    // Get configuration (repository and dependency) XML element
    Element conf = XmlUtils.getConfiguration(this.getClass());

    // Find repository elements and add them to the project
    for (Element repo : XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", conf)) {
        projectOperations.addRepository(projectOperations
                .getFocusedModuleName(), new Repository(repo));
    }

    // Install properties
    List<Element> properties = XmlUtils.findElements(
            "/configuration/gvnix/properties/*", conf);
    for (Element property : properties) {
        projectOperations.addProperty(projectOperations
                .getFocusedModuleName(), new Property(property));
    }

    // Find dependency elements and update them into the project
    DependenciesVersionManager.manageDependencyVersion(metadataService,
            projectOperations, XmlUtils.findElements(
                    "/configuration/gvnix/dependencies/dependency", conf));
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:29,代码来源:AnnotationsServiceImpl.java

示例6: setupProjectPom

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * Update project pom: install repositories and dependencies
 */
private void setupProjectPom() {
    // Get add-on configuration file
    Element configuration = XmlUtils.getConfiguration(getClass());

    // Install the add-on repository needed
    List<Element> repos = XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", configuration);
    for (Element repo : repos) {
        getProjectOperations().addRepositories(
                getProjectOperations().getFocusedModuleName(),
                Collections.singleton(new Repository(repo)));
    }

    // Install properties
    List<Element> properties = XmlUtils.findElements(
            "/configuration/gvnix/properties/*", configuration);
    for (Element property : properties) {
        getProjectOperations().addProperty(
                getProjectOperations().getFocusedModuleName(),
                new Property(property));
    }

    // Install dependencies
    List<Element> depens = XmlUtils.findElements(
            "/configuration/gvnix/dependencies/dependency", configuration);

    DependenciesVersionManager.manageDependencyVersion(
            getMetadataService(), getProjectOperations(), depens);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:33,代码来源:DatatablesOperationsImpl.java

示例7: updatePom

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * 
 * This method updates dependencies and repositories with the added to
 * configuration.xml file
 * 
 * @param configuration
 * @param moduleName
 * @param projectOperations
 */
public static void updatePom(final Element configuration,
        ProjectOperations projectOperations, MetadataService metadataService) {

    // Install the add-on repository needed
    List<Element> repos = XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", configuration);
    for (Element repo : repos) {
        projectOperations.addRepositories(
                projectOperations.getFocusedModuleName(),
                Collections.singleton(new Repository(repo)));
    }

    // Install properties
    List<Element> properties = XmlUtils.findElements(
            "/configuration/gvnix/properties/*", configuration);
    for (Element property : properties) {
        projectOperations.addProperty(projectOperations
                .getFocusedModuleName(), new Property(property));
    }

    // Install dependencies
    List<Element> depens = XmlUtils.findElements(
            "/configuration/gvnix/dependencies/dependency", configuration);

    DependenciesVersionManager.manageDependencyVersion(metadataService,
            projectOperations, depens);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:37,代码来源:GeoUtils.java

示例8: getInstance

import org.springframework.roo.project.Repository; //导入依赖的package包/类
public Pom getInstance(final Element root, final String pomPath,
          final String moduleName) {
      Validate.notBlank(pomPath, "POM's canonical path is required");
      final String artifactId = XmlUtils.getTextContent(ARTIFACT_ID_XPATH,
              root);
      final String groupId = getGroupId(root);
      final String name = XmlUtils.getTextContent(NAME_XPATH, root);
      final String packaging = XmlUtils.getTextContent(PACKAGING_XPATH, root,
              DEFAULT_PACKAGING);
      String version = XmlUtils.getTextContent(VERSION_XPATH, root);
      final String sourceDirectory = XmlUtils.getTextContent(
              SOURCE_DIRECTORY_XPATH, root);
      final String testSourceDirectory = XmlUtils.getTextContent(
              TEST_SOURCE_DIRECTORY_XPATH, root);
      final List<Dependency> dependencies = parseElements(Dependency.class,
              DEPENDENCY_XPATH, root);
      final List<Filter> filters = parseElements(Filter.class, FILTER_XPATH,
              root);
      final List<Module> modules = getModules(root, pomPath, packaging);
      final List<Plugin> plugins = parseElements(Plugin.class, PLUGIN_XPATH,
              root);
      final List<Property> pomProperties = parseElements(Property.class,
              PROPERTY_XPATH, root);
      final List<Repository> pluginRepositories = parseElements(
              Repository.class, PLUGIN_REPOSITORY_XPATH, root);
      final List<Repository> repositories = parseElements(Repository.class,
              REPOSITORY_XPATH, root);
      final List<Resource> resources = parseElements(Resource.class,
              RESOURCE_XPATH, root);
final String projectParentVersion = XmlUtils.getTextContent("/project/parent/version", root);
      final Parent parent = getParent(pomPath, root);
if(version == null) {
	version = projectParentVersion;
}
      final Collection<Path> paths = getPaths(root, packaging);
      return new Pom(groupId, artifactId, version, packaging, dependencies,
              parent, modules, pomProperties, name, repositories,
              pluginRepositories, sourceDirectory, testSourceDirectory,
              filters, plugins, resources, pomPath, moduleName, paths);
  }
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:41,代码来源:PomFactoryImpl.java

示例9: isAllPluginRepositoriesRegistered

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * Indicates whether all the given plugin repositories are registered, by
 * calling {@link #isPluginRepositoryRegistered(Repository)} for each one,
 * ignoring any <code>null</code> elements.
 * 
 * @param repositories the plugin repositories to check (can be
 *            <code>null</code>)
 * @return <code>true</code> if a <code>null</code> collection is given
 */
public boolean isAllPluginRepositoriesRegistered(
        final Collection<? extends Repository> repositories) {
    if (repositories != null) {
        for (final Repository repository : repositories) {
            if (repository != null
                    && !isPluginRepositoryRegistered(repository)) {
                return false;
            }
        }
    }
    return true;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:22,代码来源:Pom.java

示例10: isAllRepositoriesRegistered

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * Indicates whether all the given repositories are registered. Equivalent
 * to calling {@link #isRepositoryRegistered(Repository)} for each one,
 * ignoring any <code>null</code> elements.
 * 
 * @param repositories the repositories to check (can be <code>null</code>)
 * @return true if a <code>null</code> collection is given
 */
public boolean isAllRepositoriesRegistered(
        final Collection<? extends Repository> repositories) {
    if (repositories != null) {
        for (final Repository repository : repositories) {
            if (repository != null && !isRepositoryRegistered(repository)) {
                return false;
            }
        }
    }
    return true;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:20,代码来源:Pom.java

示例11: updatePomDependencies

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * This method adds necessary dependencies to project pom.xml
 */
public void updatePomDependencies() {
    // Get add-on configuration file
    Element configuration = XmlUtils.getConfiguration(getClass());

    // Install the add-on repository needed
    List<Element> repos = XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", configuration);
    for (Element repo : repos) {
        getProjectOperations().addRepositories(
                getProjectOperations().getFocusedModuleName(),
                Collections.singleton(new Repository(repo)));
    }

    // Install properties
    List<Element> properties = XmlUtils.findElements(
            "/configuration/gvnix/properties/*", configuration);
    for (Element property : properties) {
        getProjectOperations().addProperty(
                getProjectOperations().getFocusedModuleName(),
                new Property(property));
    }

    // Install dependencies
    List<Element> depens = XmlUtils.findElements(
            "/configuration/gvnix/dependencies/dependency", configuration);

    DependenciesVersionManager.manageDependencyVersion(
            getMetadataService(), getProjectOperations(), depens);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:33,代码来源:FancytreeOperationsImpl.java

示例12: addGvNIXAnnotationsDependecy

import org.springframework.roo.project.Repository; //导入依赖的package包/类
public void addGvNIXAnnotationsDependecy() {

        // Install the add-on Google code repository and dependency needed to
        // get the annotations

        Element conf = XmlUtils.getConfiguration(this.getClass());

        // Install repositories
        List<Element> repos = XmlUtils.findElements(
                "/configuration/gvnix/repositories/repository", conf);
        for (Element repo : repos) {

            projectOperations.addRepository(projectOperations
                    .getFocusedModuleName(), new Repository(repo));
        }

        // Install properties
        List<Element> properties = XmlUtils.findElements(
                "/configuration/gvnix/properties/*", conf);
        for (Element property : properties) {
            projectOperations.addProperty(projectOperations
                    .getFocusedModuleName(), new Property(property));
        }

        // Install dependencies
        List<Element> depens = XmlUtils.findElements(
                "/configuration/gvnix/dependencies/dependency", conf);
        DependenciesVersionManager.manageDependencyVersion(metadataService,
                projectOperations, depens);
    }
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:31,代码来源:OCCChecksumOperationsImpl.java

示例13: updateRepositories

import org.springframework.roo.project.Repository; //导入依赖的package包/类
/**
 * 
 * This method update repositories with the added to configuration.xml file
 * 
 * @param configuration
 * @param moduleName
 * @param projectOperations
 */
public static void updateRepositories(final Element configuration,
        String path, ProjectOperations projectOperations) {
    final List<Repository> repositories = new ArrayList<Repository>();
    final List<Element> geoRepositories = XmlUtils.findElements(path,
            configuration);
    for (final Element repositoryElement : geoRepositories) {
        repositories.add(new Repository(repositoryElement));
    }
    projectOperations.addRepositories(
            projectOperations.getFocusedModuleName(), repositories);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:20,代码来源:HibernateSpatialGeoUtils.java

示例14: setup

import org.springframework.roo.project.Repository; //导入依赖的package包/类
public void setup() {
    // Get add-on configuration file
    Element configuration = XmlUtils.getConfiguration(getClass());

    // Install the add-on repository needed
    List<Element> repos = XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", configuration);
    for (Element repo : repos) {
        getProjectOperations().addRepositories(
                getProjectOperations().getFocusedModuleName(),
                Collections.singleton(new Repository(repo)));
    }

    // Install properties
    List<Element> properties = XmlUtils.findElements(
            "/configuration/gvnix/properties/*", configuration);
    for (Element property : properties) {
        getProjectOperations().addProperty(
                getProjectOperations().getFocusedModuleName(),
                new Property(property));
    }

    // Install dependencies
    List<Element> depens = XmlUtils.findElements(
            "/configuration/gvnix/dependencies/dependency", configuration);

    DependenciesVersionManager.manageDependencyVersion(
            getMetadataService(), getProjectOperations(), depens);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:30,代码来源:JpaOperationsImpl.java

示例15: setupMavenDependency

import org.springframework.roo.project.Repository; //导入依赖的package包/类
public void setupMavenDependency() {
    Element configuration = XmlUtils.getConfiguration(getClass());

    // Install the add-on Google code repository and dependency needed to
    // get the annotations

    List<Element> repos = XmlUtils.findElements(
            "/configuration/gvnix/repositories/repository", configuration);
    for (Element repo : repos) {
        projectOperations.addRepository(projectOperations
                .getFocusedModuleName(), new Repository(repo));
    }

    List<Element> depens = XmlUtils.findElements(
            "/configuration/gvnix/dependencies/dependency", configuration);
    DependenciesVersionManager.manageDependencyVersion(metadataService,
            projectOperations, depens);

    depens = XmlUtils.findElements(
            "/configuration/dependencies/dependency", configuration);
    for (Element depen : depens) {
        projectOperations.addDependency(projectOperations
                .getFocusedModuleName(), new Dependency(depen));
    }

    // Install properties
    List<Element> properties = XmlUtils.findElements(
            "/configuration/gvnix/properties/*", configuration);
    for (Element property : properties) {
        projectOperations.addProperty(projectOperations
                .getFocusedModuleName(), new Property(property));
    }
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:34,代码来源:WebModalDialogOperationsImpl.java


注:本文中的org.springframework.roo.project.Repository类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。