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


Java Property类代码示例

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


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

示例1: installDependencies

import org.springframework.roo.project.Property; //导入依赖的package包/类
/**
 * Install jackson 2 dependencies on project pom
 */
private void installDependencies() {
    // Get add-on configuration file
    Element configuration = XmlUtils.getConfiguration(getClass());
    // 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,代码行数:23,代码来源:WebJpaBatchOperationsImpl.java

示例2: installMavenPlugins

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

   	// Add properties
	  List<Element> properties = XmlUtils.findElements(
			"/configuration/properties/*", configuration);
	  for (Element property : properties) {
		  projectOperations.addProperty(moduleName, new Property(property));
	  }
   	
	  // Add Plugins
	  List<Element> elements = XmlUtils.findElements(
			"/configuration/plugins/plugin",
			configuration);
	  for (Element element : elements) {
		  Plugin plugin = new Plugin(element);
		  projectOperations.addBuildPlugin(
				moduleName, plugin);
	  }

}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:22,代码来源:JspOperationsImpl.java

示例3: installMavenPlugins

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

   	// Add properties
	List<Element> properties = XmlUtils.findElements(
			"/configuration/properties/*", configuration);
	for (Element property : properties) {
		getProjectOperations().addProperty(moduleName, new Property(property));
	}
   	
	// Add Plugins
	List<Element> elements = XmlUtils.findElements(
			"/configuration/plugins/plugin",
			configuration);
	for (Element element : elements) {
		Plugin plugin = new Plugin(element);
		getProjectOperations().addBuildPlugin(
				moduleName, plugin);
	}

}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:22,代码来源:JsfOperationsImpl.java

示例4: addAddonDependency

import org.springframework.roo.project.Property; //导入依赖的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

示例5: updatePomProperties

import org.springframework.roo.project.Property; //导入依赖的package包/类
/**
 * Install properties defined in external XML file
 * 
 * @param configuration
 */
private void updatePomProperties(Element configuration) {
    List<Element> addonProperties = XmlUtils.findElements(
            "/configuration/gvnix/menu/properties/*", configuration);
    for (Element property : addonProperties) {
        getProjectOperations().addProperty(
                getProjectOperations().getFocusedModuleName(),
                new Property(property));
    }
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:15,代码来源:MenuEntryOperationsImpl.java

示例6: setupProjectPom

import org.springframework.roo.project.Property; //导入依赖的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.Property; //导入依赖的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.Property; //导入依赖的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: getPropertiesExcludingValue

import org.springframework.roo.project.Property; //导入依赖的package包/类
/**
 * Locates any properties which match the presented property, excluding the
 * value. This is useful for upgrade use cases, where it is necessary to
 * locate any properties with the name so that they can be removed.
 * 
 * @param property to locate (required; note the value is ignored in
 *            comparisons)
 * @return any matching properties (never returns null, but may return an
 *         empty {@link Set})
 */
public Set<Property> getPropertiesExcludingValue(final Property property) {
    Validate.notNull(property, "Property to locate is required");
    final Set<Property> result = new HashSet<Property>();
    for (final Property p : pomProperties) {
        if (property.getName().equals(p.getName())) {
            result.add(p);
        }
    }
    return result;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:21,代码来源:Pom.java

示例10: getProperty

import org.springframework.roo.project.Property; //导入依赖的package包/类
/**
 * Locates the first occurrence of a property for a given name and returns
 * it.
 * 
 * @param name the property name (required)
 * @return the property if found otherwise null
 */
public Property getProperty(final String name) {
    Validate.notBlank(name, "Property name to locate is required");
    for (final Property p : pomProperties) {
        if (name.equals(p.getName())) {
            return p;
        }
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:17,代码来源:Pom.java

示例11: updatePomProperties

import org.springframework.roo.project.Property; //导入依赖的package包/类
private void updatePomProperties(final Element configuration,
        final String moduleName) {
    final List<Element> databaseProperties = XmlUtils.findElements(
            "/configuration/spring-security/properties/*", configuration);
    for (final Element property : databaseProperties) {
        getProjectOperations().addProperty(moduleName, new Property(property));
    }
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:9,代码来源:SecurityOperationsImpl.java

示例12: updatePomDependencies

import org.springframework.roo.project.Property; //导入依赖的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

示例13: addGvNIXAnnotationsDependecy

import org.springframework.roo.project.Property; //导入依赖的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

示例14: setup

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