Spring Framework PathMatchingResourcePatternResolver - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework PathMatchingResourcePatternResolver class.

This code example shows how to use the following methods:getResource
This code example shows how to use the following methods:doFindPathMatchingFileResources
			String fullPattern = pcResource.getPath() + subPattern;
			Set<Resource> result = new HashSet<Resource>();
			doRetrieveMatchingPortletContextResources(pc, fullPattern, pcResource.getPath(), result);
			return result;
		} 
		return super.doFindPathMatchingFileResources(rootDirResource, subPattern);
	} 
 
	/** 
	 * Recursively retrieve PortletContextResources that match the given pattern, 
	 * adding them to the given result set. 
	 * @param portletContext the PortletContext to work on 
	 * @param fullPattern the pattern to match against, 
	 * with preprended root directory path 
	 * @param dir the current directory 
	 * @param result the Set of matching Resources to add to 
	 * @throws IOException if directory contents could not be retrieved 
	 * @see org.springframework.web.portlet.context.PortletContextResource 
	 * @see javax.portlet.PortletContext#getResourcePaths 
	 */ 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:doFindPathMatchingFileResources
			Set<Resource> result = new LinkedHashSet<Resource>(8); 
			doRetrieveMatchingServletContextResources(sc, fullPattern, scResource.getPath(), result); 
			return result; 
		} 
		else { 
			return super.doFindPathMatchingFileResources(rootDirResource, subPattern); 
		} 
	} 
 
	/** 
	 * Recursively retrieve ServletContextResources that match the given pattern, 
	 * adding them to the given result set. 
	 * @param servletContext the ServletContext to work on 
	 * @param fullPattern the pattern to match against, 
	 * with preprended root directory path 
	 * @param dir the current directory 
	 * @param result the Set of matching Resources to add to 
	 * @throws IOException if directory contents could not be retrieved 
	 * @see ServletContextResource 
	 * @see javax.servlet.ServletContext#getResourcePaths 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getResource
	public Resource getSqlResources(String datasourceName) {
		String path = this.getDefaultSqlResourcesPaths().get(datasourceName);
		if (null == path) {
			return null; 
		} 
		PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
		return resolver.getResource(path);
	} 
	 
	public Map<String, String> getDefaultSqlResourcesPaths() {
		return _defaultSqlResourcesPaths;
	} 
	protected void setDefaultSqlResourcesPaths(Map<String, String> defaultSqlResourcesPaths) {
		this._defaultSqlResourcesPaths = defaultSqlResourcesPaths;
	} 
	 
	public List<IPostProcess> getPostProcesses() {
		return _postProcesses;
	} 
	protected void setPostProcesses(List<IPostProcess> postProcesses) {
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:getResources
 
    // for some reason, this doesn't work 
    protected List listSchema1() throws IOExceptionPathMatchingResourcePatternResolver resolver =
                new PathMatchingResourcePatternResolver(getClass().getClassLoader());
        Resource[] resources = resolver.getResources("**/META-INF/*.xsd");
        List list = new LinkedList();
        for (int i = 0; i < resources.length; ++i)
        { 
            list.add(resources[i].getURL());
        } 
        return list;
    } 
 
    // this is a bit ad-hoc, but seems to work efficiently 
    // http://forum.java.sun.com/thread.jspa?threadID=286026&messageID=1119510 
    protected List listSchema2() throws IOExceptionClassLoader loader = getClass().getClassLoader();
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 */ 
public final class MifosResourceUtil { 
    private MifosResourceUtil() { 
    } 
 
    private static final ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
 
    public static File getFile(String fileNameWithLocation) {
        File file;
        try { 
            file = ResourceUtils.getFile(fileNameWithLocation);
        } catch (FileNotFoundException e) {
            throw new MifosRuntimeException("file not found :" + fileNameWithLocation, e);
        } 
        return file;
    } 
 
    private static File getFile(String location, String fileName) {
        return getFile(location + fileName);
    } 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
    private String databaseName; 
 
    @Value("${ehour.db.cache:true}") 
    private String caching; 
 
    protected static final PathMatchingResourcePatternResolver RESOLVER = new PathMatchingResourcePatternResolver(); 
    private static final Logger LOGGER = Logger.getLogger(HibernateConfiguration.class); 
 
    public HibernateConfiguration() { 
    } 
 
    public HibernateConfiguration(DataSource dataSource, String databaseName,  String caching) { 
        this.dataSource = dataSource; 
        this.databaseName = databaseName; 
        this.caching = caching; 
    } 
 
    @Bean(name = "sessionFactory") 
    public SessionFactory getSessionFactory() throws Exception { 
        validateAndSetCaching(); 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	private HiveClientFactoryBean hiveClientFactory;
	private HiveTemplate hiveTemplate;
 
 
	private ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(
			new FileSystemResourceLoader());
 
	 
	public void init() { 
		hiveClientFactory = new HiveClientFactoryBean();
 
		hiveClientFactory.setHost(host);
		hiveClientFactory.setPort(port);
		hiveClientFactory.setTimeout(timeout.intValue());
 
		hiveTemplate = new HiveTemplate(hiveClientFactory.getObject());
	} 
 
	private String info() {
		StringBuilder sb = new StringBuilder();
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	private String jobTracker, jobName, jobPriority;
	private Boolean validateEachStatement;
	private String propertiesLocation;
 
	private ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(
			new FileSystemResourceLoader());
 
	 
	public void init() throws Exception {
		pigContextFactory = new PigContextFactoryBean();
		pigContextFactory.setConfiguration(hadoopConfiguration);
 
		if (StringUtils.hasText(jobTracker)) {
			pigContextFactory.setJobTracker(jobTracker);
		} 
 
		if (execType != null) {
			pigContextFactory.setExecType(execType);
		} 
		Properties props = loadProperties();
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
	private String home = "";
	private String cmd = home + BIN;
	private File wkdir = new File(".");
 
	private ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(
			new FileSystemResourceLoader());
 
	public RCommands() { 
		String os = System.getProperty("os.name").toLowerCase();
 
		// set default R paths - best effort 
		if (os.contains("win")) {
			home = "C:\\Program Files\\R\\";
			File f = new File(home);
			if (f.exists() && f.isDirectory()) {
				File[] listFiles = f.listFiles();
				if (listFiles != null && listFiles.length > 0) {
					home = listFiles[0].getAbsolutePath() + "\\";
				} 
			} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Spring Framework PathMatchingResourcePatternResolver Methods: