Add a resource action binding to the {@link #actionBindings} list.

@param actionPath Path of the action
@param resourcePath Path of a resource located under
433963
public void addResourceActionBinding(final String actionPath, final String resourcePath) {
		this.addActionBinding(new ActionBinding() {
			public boolean supports(ActionContext actionContext) {
				return actionContext.getPath().equals(actionPath);
			}

			public Action create(ActionContext actionContext) {
				return new ResourceAction(actionContext, resourcePath);
			}
		});
	}
1291424
@Override
	public String getFilePath(String resourcePath) {
		String path = resourcePath.replace('/', File.separatorChar);
		return new File(baseDir, path).getAbsolutePath();
	}
633023
public static <T> T withFilePathOrClasspath(
            String resourceFilePathOrClasspath,
            TypeReference<T> typeReference) {
        return withJsonString(JMResources
                        .getStringWithFilePathOrClasspath(resourceFilePathOrClasspath),
                typeReference);
    }
900008
public static void loadResource(final String serializerId,
      @SuppressWarnings("rawtypes") final Map<String, ArtifactSerializer> artifactSerializers,
      final String resourcePath, final Map<String, Object> resources) {

    final File resourceFile = new File(resourcePath);
    if (resourceFile != null) {
      final String resourceId = IOUtils
          .normalizeLexiconName(resourceFile.getName());
      final ArtifactSerializer<?> serializer = artifactSerializers
          .get(serializerId);
      final InputStream resourceIn = IOUtils.openFromFile(resourceFile);
      try {
        resources.put(resourceId, serializer.create(resourceIn));
      } catch (final InvalidFormatException e) {
        e.printStackTrace();
      } catch (final IOException e) {
        e.printStackTrace();
      } finally {
        try {
          resourceIn.close();
        } catch (final IOException e) {
        }
      }
    }
  }
754930
protected function setResourceMembers($resourcePath = null)
    {
        // remove trailing slash here, override this function if you need it
        $this->resourcePath = rtrim($resourcePath, '/');
        $this->resourceArray = (!empty($this->resourcePath)) ? explode('/', $this->resourcePath) : [];

        if (!empty($this->resourceArray)) {
            $resource = array_get($this->resourceArray, 0);
            if (!is_null($resource) && ('' !== $resource)) {
                $this->resource = $resource;
            }
            $id = array_get($this->resourceArray, 1);
            if (!is_null($id) && ('' !== $id)) {
                $this->resourceId = $id;
            }
        }

        return $this;
    }
809893
public void setResourceType(java.util.Collection<StringFilter> resourceType) {
        if (resourceType == null) {
            this.resourceType = null;
            return;
        }

        this.resourceType = new java.util.ArrayList<StringFilter>(resourceType);
    }
508163
protected void internalDeleteResource(final String resourcePath) {

        CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

            @Override
            public void execute() {

                start(0, false);
                getGalleryService().deleteResource(resourcePath, this);
            }

            @Override
            protected void onResponse(Void result) {

                stop(false);
                updateResultsTab(false);
            }
        };
        action.execute();
    }
541374
public Binding createBinding(String propertyPath, String binderId, Map context)
    {
        Assert.notNull(context, "Context must not be null");
        Binder binder = ((SwingBinderSelectionStrategy)getBinderSelectionStrategy()).getIdBoundBinder(binderId);
        Binding binding = binder.bind(getFormModel(), propertyPath, context);
        interceptBinding(binding);
        return binding;
    }
525691
protected void addLinkedResources(String path, GeneratorContext context, List<FilePathMapping> fMappings) {
		linkedResourceMap.put(getResourceCacheKey(path, context), new CopyOnWriteArrayList<>(fMappings));
		JoinableResourceBundle bundle = context.getBundle();
		if (bundle != null) {

			List<FilePathMapping> bundleFMappings = bundle.getLinkedFilePathMappings();
			for (FilePathMapping fMapping : fMappings) {
				FilePathMapping fm = new FilePathMapping(bundle, fMapping.getPath(), fMapping.getLastModified());
				if (!bundleFMappings.contains(fm)) {
					bundleFMappings.add(fm);
				}
			}
		}

	}
685733
protected void addLinkedResources(String path, GeneratorContext context) {
		List<Locale> locales = new ArrayList<>();
		Locale currentLocale = context.getLocale();
		if (currentLocale != null) {
			locales.add(currentLocale);
			if (StringUtils.isNotEmpty(currentLocale.getVariant())) {
				locales.add(new Locale(currentLocale.getCountry(), currentLocale.getLanguage()));
			}
			if (StringUtils.isNotEmpty(currentLocale.getLanguage())) {
				locales.add(new Locale(currentLocale.getCountry()));
			}
		}

		// Adds fallback locale
		locales.add(control.getFallbackLocale());
		Locale baseLocale = new Locale("", "");
		if (!locales.contains(baseLocale)) {
			locales.add(baseLocale);
		}

		List<FilePathMapping> fMappings = getFileMappings(path, context, locales);
		addLinkedResources(path, context, fMappings);

	}
264237
@Override
    public T addAsManifestResource(Package resourcePackage, String resourceName, ArchivePath target)
        throws IllegalArgumentException {
        Validate.notNull(resourcePackage, "ResourcePackage must be specified");
        Validate.notNull(resourceName, "ResourceName must be specified");
        Validate.notNull(target, "Target must be specified");

        String classloaderResourceName = AssetUtil.getClassLoaderResourceName(resourcePackage, resourceName);
        Asset resource = new ClassLoaderAsset(classloaderResourceName);

        return addAsManifestResource(resource, target);
    }
301016
public Routes add(String controllerKey, Class<? extends Controller> controllerClass, String viewPath) {
		routeItemList.add(new Route(controllerKey, controllerClass, viewPath));
		return this;
	}
1095758
@Override
    public T addAsLibrary(String resourceName, String target) throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName must be specified");
        Validate.notNull(target, "Target must be specified");

        return addAsLibrary(resourceName, new BasicPath(target));
    }
168320
public void touchResource(String resourcePath) throws Exception {

        CmsResource resource = m_cms.readResource(resourcePath);
        CmsLockActionRecord action = CmsLockUtil.ensureLock(m_cms, resource);
        try {
            OpenCms.getWorkplaceManager().flushMessageCache();
            // One important reason for touching resources via the shell is to write mapped values containing
            // localization macros to properties, so we flush the workplace messages immediately before the touch operation
            // in case an older version of the workplace messages (not containing the keys we need) has already been cached
            touchSingleResource(m_cms, resourcePath, System.currentTimeMillis(), true, true, true);
        } finally {
            if (action.getChange() == LockChange.locked) {
                m_cms.unlockResource(resource);
            }
        }
    }
393737
protected boolean mappingActionPath(MappingPathResource pathResource, ActionFoundPathHandler handler) throws Exception {
        final String mappingPath = pathResource.getMappingPath();
        final String[] names = LdiStringUtil.split(mappingPath, URL_DELIMITER); // e.g. [sea, land] if /sea/land/
        final LaContainer root = container.getRoot(); // because actions are in root
        final String rootAction = buildActionName(pathResource, null, "root");
        if (names.length == 0) { // root action, / => rootAction
            if (hasActionDef(root, rootAction)) {
                if (executeHandlerIfFound(pathResource, handler, rootAction, null)) {
                    return true;
                }
            }
        }
        StringBuilder prefixSb = null; // lazy loaded, "" => sea => seaLand
        List<String> previousList = null; // lazy loaded, (empty) => [sea] => [sea, land]
        for (int index = 0; index < names.length; index++) {
            final String currentName = names[index];
            if (containsNotAllowedCharacterAsActionPath(currentName)) { // e.g. /Sea/land/, /sea/Land/
                return false; // cannot use upper case in action path (while, allowed in param path)
            }
            final int nextIndex = index + 1;
            if (index == 0) { // first loop
                // /sea/ => seaAction
                final String directAction = buildActionName(pathResource, null, currentName);
                if (hasActionDef(root, directAction)) {
                    if (executeHandlerIfFound(pathResource, handler, directAction, buildParamPath(names, nextIndex))) {
                        return true;
                    }
                }
                // /sea/ => sea_seaAction
                final String wholePkgAction = buildActionName(pathResource, currentName + "_", currentName);
                if (hasActionDef(root, wholePkgAction)) {
                    if (executeHandlerIfFound(pathResource, handler, wholePkgAction, buildParamPath(names, nextIndex))) {
                        return true;
                    }
                }
            } else { // second or more loop
                // _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
                // e.g. process of outer and nested loop
                // 
                // second : /sea/land/
                //   first  : seaLandAction
                //   more   : sea_seaLandAction
                //   whole  : sea_land_seaLandAction
                // 
                // third : /sea/land/piari/
                //   first  : seaLandPiariAction
                //   second : sea_seaLandPiariAction
                //   more   : sea_land_seaLandPiariAction
                //   whole  : sea_land_piari_seaLandPiariAction
                // 
                // fourth : /sea/land/piari/bonvo
                //   first  : seaLandPiariBonvoAction
                //   second : sea_seaLandPiariBonvoAction
                //   third  : sea_land_seaLandPiariBonvoAction
                //   more   : sea_land_piari_seaLandPiariBonvoAction
                //   whole  : sea_land_piari_bonvo_seaLandPiariBonvoAction
                // _/_/_/_/_/_/_/_/_/_/
                final String classPrefix = prefixSb.toString() + initCap(currentName); // seaLand, seaLandPiari
                StringBuilder pkgSb = null; // lazy loaded
                for (String previous : previousList) { // always one or more loop
                    final String actionName = buildActionName(pathResource, pkgSb != null ? pkgSb.toString() : null, classPrefix);
                    if (hasActionDef(root, actionName)) {
                        if (executeHandlerIfFound(pathResource, handler, actionName, buildParamPath(names, nextIndex))) {
                            return true;
                        }
                    }
                    pkgSb = pkgSb != null ? pkgSb : new StringBuilder(mappingPath.length());
                    pkgSb.append(previous).append("_");
                }
                final String morePkgActionName = buildActionName(pathResource, pkgSb.toString(), classPrefix);
                if (hasActionDef(root, morePkgActionName)) {
                    if (executeHandlerIfFound(pathResource, handler, morePkgActionName, buildParamPath(names, nextIndex))) {
                        return true;
                    }
                }
                pkgSb.append(currentName).append("_"); // sea_land_, sea_land_piari_, ...
                final String wholePkgActionName = buildActionName(pathResource, pkgSb.toString(), classPrefix);
                if (hasActionDef(root, wholePkgActionName)) {
                    if (executeHandlerIfFound(pathResource, handler, wholePkgActionName, buildParamPath(names, nextIndex))) {
                        return true;
                    }
                }
            }
            prefixSb = prefixSb != null ? prefixSb : new StringBuilder(mappingPath.length());
            prefixSb.append(index == 0 ? currentName : initCap(currentName));
            previousList = previousList != null ? previousList : new ArrayList<String>(4);
            previousList.add(currentName);
        }
        if (names.length > 0) { // e.g. /sea/land but not found except root action
            // only root action's named methods are low priority (to avoid searching cost)
            if (hasActionDef(root, rootAction)) {
                if (executeHandlerIfFound(pathResource, handler, rootAction, buildParamPath(names, 0))) {
                    return true;
                }
            }
        }
        return false;
    }
597748
public void registerLayout(String path, String resource) throws Exception {
        Layout layout = LayoutParser.parseResource(resource);
        ElementUI parent = parentFromPath(path);
        
        if (parent != null) {
            layout.materialize(parent);
        }
    }
1218688
public void setPath(String strPath) throws PageException {
	if (strPath == null) return;
	this.path = ResourceUtil.toResourceNotExisting(pageContext, strPath.trim());
	// this.path=new File(path.toLowerCase().trim());

	pageContext.getConfig().getSecurityManager().checkFileLocation(this.path);

	if (!this.path.exists()) {
	    Resource parent = this.path.getParentResource();
	    if (parent != null && parent.exists()) this.path.mkdirs();
	    else {
		throw new ApplicationException("attribute path of the tag collection must be a existing directory");
	    }
	}
	else if (!this.path.isDirectory()) throw new ApplicationException("attribute path of the tag collection must be a existing directory");
    }