プロパティファイルから取得する。
<p>プロパティ名を補完する。
@param path プロパティファイルのパス名
@param allowedNoDefault デフォルトのメッセージがない場合を許可するかどうか。
@param appendUserResource クラスパスのルートにあるユーザ定義のメッセージソースも読み込むかどうか指定します。
@return
6011
private MessageResource loadDefaultResource(final boolean allowedNoDefault, final boolean appendUserResource) {

        final String path = getPropertyPath();
        Properties props = new Properties();
        try {
            props.load(new InputStreamReader(MessageResolver.class.getResourceAsStream(path), "UTF-8"));
        } catch (NullPointerException | IOException e) {
            if(allowedNoDefault) {
                return MessageResource.NULL_OBJECT;
            } else {
                throw new RuntimeException("fail default properties. :" + path, e);
            }
        }

        final MessageResource resource = new MessageResource();

        final Enumeration<?> keys = props.propertyNames();
        while(keys.hasMoreElements()) {
            String key = (String) keys.nextElement();
            String value = props.getProperty(key);
            resource.addMessage(key, value);
        }

        // ユーザのリソースの読み込み
        if(appendUserResource) {
            resource.addMessage(loadUserResource(path));
        }

        return resource;

    }
24712
public void logOpenFile(String path, INodeFileUnderConstruction newNode)  
                   throws IOException {
    AddOp op = AddOp.getInstance();  
    op.set(newNode.getId(),
        path,
        newNode.getReplication(), 
        newNode.getModificationTime(),
        newNode.getAccessTime(),
        newNode.getPreferredBlockSize(),
        newNode.getBlocks(),
        newNode.getPermissionStatus(),
        newNode.getClientName(),
        newNode.getClientMachine());   
    logEdit(op);
  }
664429
@Deprecated
    public <T> MutateInBuilder arrayAppend(String path, T value, boolean createPath) {
        asyncBuilder.arrayAppend(path, value, new SubdocOptionsBuilder().createPath(createPath));
        return this;
    }
311878
private function mergePathComputedMask( $currentMask, $resourceType, $userRole, $path )
    {
        $_folderEntries = $this->_aclEntries[$path];

        $_possibleEntries = array();

        $_possibleEntries[0] = "*#@#*";
        $_possibleEntries[1] = "*#@#" . $resourceType;

        if (!is_null($userRole))
        {
            $_possibleEntries[2] = $userRole . "#@#*";
            $_possibleEntries[3] = $userRole . "#@#" . $resourceType;
        }

        for ($r = 0; $r < sizeof($_possibleEntries); $r++)
        {
            $_possibleKey = $_possibleEntries[$r];
            if (array_key_exists($_possibleKey, $_folderEntries))
            {
                $_rulesMasks = $_folderEntries[$_possibleKey];

                $currentMask |= array_sum($_rulesMasks[0]);
                $currentMask ^= ($currentMask & array_sum($_rulesMasks[1]));
            }
        }

        return $currentMask;
    }
658145
@SuppressWarnings("squid:S1452")
	public static FileAttribute<?>[] userDirectoryDefault(FileSystem fileSystem) {
		List<FileAttribute<?>> userDefault = new ArrayList<>();
		Set<String> fileAttributeViews = fileSystem.supportedFileAttributeViews();

		if (fileAttributeViews.contains(POSIX)) {
			userDefault.add(PosixFilePermissions.asFileAttribute(EnumSet.of(PosixFilePermission.OWNER_READ,
					PosixFilePermission.OWNER_WRITE, PosixFilePermission.OWNER_EXECUTE)));
		}
		return userDefault.toArray(new @Nullable FileAttribute<?>[userDefault.size()]);
	}
538784
private static CmsResource getDefaultResource(CmsObject cms, String path) {

        CmsResource resource = (CmsResource)CmsVfsMemoryObjectCache.getVfsMemoryObjectCache().getCachedObject(
            cms,
            path);
        if (resource == null) {
            try {
                resource = cms.readResource(path);
                CmsVfsMemoryObjectCache.getVfsMemoryObjectCache().putCachedObject(cms, path, resource);
            } catch (CmsException e) {
                LOG.warn(e.getLocalizedMessage(), e);
            }
        }
        return resource;
    }
70016
public String getUserResourceUri(final String path){
        if(StringUtils.isEmpty(path)) {
            throw new IllegalArgumentException("Path cannot be null");
        }
        return StringUtils.join(new String[] {getUserUri(), path}, "/");
    }
921247
public Reader generateResource(String path, GeneratorContext context) {
	
		Locale locale = null == context.getLocale() ? Locale.getDefault()
				: context.getLocale();
		String validators = context.getPath();
		String validatorParams = context.getParenthesesParam();

		String messagesNS = MessageBundleScriptCreator.DEFAULT_NAMESPACE;
		boolean stopOnErrors = true;

		StringTokenizer valparams = new StringTokenizer(validatorParams, "|");
		String validatorMappingKey = valparams.nextToken();
		if (valparams.hasMoreTokens())
			messagesNS = valparams.nextToken();
		if (valparams.hasMoreTokens())
			stopOnErrors = Boolean.valueOf(valparams.nextToken())
					.booleanValue();

		// Build the ValidatorResources if it doesn't exist yet
		if (!validatorResourcesMap.containsKey(validatorMappingKey)) {
			createValidatorResources(validatorMappingKey, context.getConfig());
		}

		ValidatorResources validatorResources = (ValidatorResources) validatorResourcesMap
				.get(validatorMappingKey);
		StringBuffer sb = new StringBuffer();
		StringTokenizer tk = new StringTokenizer(validators, "|");
		while (tk.hasMoreTokens()) {
			String validator = tk.nextToken();
			if (STATIC_JAVASCRIPT_KEY.equals(validator)) {
				sb.append(buildStaticJavascript(validatorResources));
			} else
				sb.append(buildFormJavascript(validatorResources, validator,
						locale, messagesNS, stopOnErrors));

		}

		return new StringReader(sb.toString());
	}
1229205
public static URI appendPathOrDie(URI base, String path) {
    try {
      return appendPath(base, path);
    } catch (URISyntaxException e) {
      throw new RuntimeException(e);
    }
  }
793101
public static void checkDatasourcePath(String modelNodePath) {
        if (!modelNodePath.startsWith(DATASOURCE_PATH_PREFIX) && !modelNodePath.startsWith(XA_DATASOURCE_PATH_PREFIX)) {
            String msg = String.format("[%s] is not a datasource path. It must start with either [%s] or [%s]",
                    modelNodePath, DATASOURCE_PATH_PREFIX, XA_DATASOURCE_PATH_PREFIX);
            throw new IllegalArgumentException(msg);
        }
    }
1144274
B append(BasePath<B> path) {
    ImmutableList.Builder<String> components = ImmutableList.builder();
    components.addAll(this.getSegments());
    components.addAll(path.getSegments());
    return createPathWithSegments(components.build());
  }
846173
private StringBuffer determineMethodsAllowed(String path) {

        StringBuffer methodsAllowed = new StringBuffer();
        boolean exists = true;
        I_CmsRepositoryItem item = null;
        try {
            item = m_session.getItem(path);
        } catch (CmsException e) {
            exists = false;
        }

        if (!exists) {

            methodsAllowed.append(METHOD_OPTIONS);
            methodsAllowed.append(", ").append(METHOD_PUT);
            methodsAllowed.append(", ").append(METHOD_MKCOL);
            methodsAllowed.append(", ").append(METHOD_LOCK);
            return methodsAllowed;
        }

        // add standard http methods
        methodsAllowed.append(METHOD_OPTIONS);
        methodsAllowed.append(", ").append(METHOD_GET);
        methodsAllowed.append(", ").append(METHOD_HEAD);
        methodsAllowed.append(", ").append(METHOD_POST);
        methodsAllowed.append(", ").append(METHOD_DELETE);
        methodsAllowed.append(", ").append(METHOD_TRACE);

        // add special WebDAV methods
        methodsAllowed.append(", ").append(METHOD_LOCK);
        methodsAllowed.append(", ").append(METHOD_UNLOCK);
        methodsAllowed.append(", ").append(METHOD_MOVE);
        methodsAllowed.append(", ").append(METHOD_COPY);
        methodsAllowed.append(", ").append(METHOD_PROPPATCH);

        if (m_listings) {
            methodsAllowed.append(", ").append(METHOD_PROPFIND);
        }

        if (item != null) {
            if (!item.isCollection()) {
                methodsAllowed.append(", ").append(METHOD_PUT);
            }
        }
        return methodsAllowed;
    }
807882
@Override
  public PathImpl lookupImpl(String userPath, 
                         Map<String,Object> newAttributes,
                         boolean isAllowRoot)
  {
    String newPath;

    if (userPath == null)
      return _root.fsWalk(getPath(), newAttributes, "/");

    int length = userPath.length();
    int colon = userPath.indexOf(':');
    int slash = userPath.indexOf('/');
    int query = userPath.indexOf('?');

    // parent handles scheme:xxx
    if (colon != -1 && (colon < slash || slash == -1))
      return super.lookupImpl(userPath, newAttributes, isAllowRoot);
      
      // //hostname
    if (slash == 0 && length > 1 && userPath.charAt(1) == '/')
      return schemeWalk(userPath, newAttributes, userPath, 0);

      // /path
    else if (slash == 0) {
      String queryString = "";
      if (query >= 0) {
        queryString = userPath.substring(query);
        userPath = userPath.substring(0, query);
      }
      
      newPath = normalizePath("/", userPath, 0, '/');
      
      if (query >= 0)
        newPath += queryString;
    }
      // path
    else {
      String queryString = "";
      if (query >= 0) {
        queryString = userPath.substring(query);
        userPath = userPath.substring(0, query);
      }
      
      newPath = normalizePath(_pathname, userPath, 0, '/');
      
      if (query >= 0)
        newPath += queryString;
    }

    // XXX: does missing root here cause problems with restrictions?
    return _root.fsWalk(userPath, newAttributes, newPath);
  }
204179
Rule FieldUserdefPlay() {
		return Sequence(String("u:"),
				ZeroOrMore(WSP()).suppressNode(),
				Userdef(), HeaderEol()).label(FieldUserdefPlay);
	}
966883
protected void setDefaultsForEmptyResourceFields() throws CmsImportExportException {

        // get UUID for the structure
        if (m_resourceBuilder.getStructureId() == null) {
            // if null generate a new structure id
            m_resourceBuilder.setStructureId(new CmsUUID());
        }

        // get UUIDs for the resource
        if ((m_resourceBuilder.getResourceId() == null) || (m_resourceBuilder.getType().isFolder())) {
            // folders get always a new resource UUID
            m_resourceBuilder.setResourceId(new CmsUUID());
            m_resourceIdWasNull = true;
        }

        // read date last modified from the resource, default to currentTime for folders
        if (m_resourceBuilder.getDateLastModified() == DATE_LAST_MODIFICATION_FILETIME) {
            if (null != m_source) {
                m_resourceBuilder.setDateLastModified(m_helper.getFileModification(m_source));
            } else {
                m_resourceBuilder.setDateLastModified(System.currentTimeMillis());
            }
        }

        if (m_resourceBuilder.getDateLastModified() == DATE_LAST_MODIFICATION_UNSPECIFIED) {
            m_resourceBuilder.setDateLastModified(System.currentTimeMillis());
        }

        if (null == m_resourceBuilder.getUserLastModified()) {
            m_resourceBuilder.setUserLastModified(m_cms.getRequestContext().getCurrentUser().getId());
        }

        if (m_resourceBuilder.getDateCreated() == DATE_CREATED_UNSPECIFIED) {
            m_resourceBuilder.setDateCreated(System.currentTimeMillis());
        }

        if (m_resourceBuilder.getUserCreated().isNullUUID()) {
            m_resourceBuilder.setUserCreated(getRequestContext().getCurrentUser().getId());
        }

        if (m_properties == null) {
            m_properties = new HashMap<String, CmsProperty>();
        }
    }
645163
public static List<String> applySpecialPaths(List<String> pathTokens) throws IllegalArgumentException {
        final ArrayList<String> newTokens = new ArrayList<String>();
        for (String pathToken : pathTokens) {
            if (isCurrentToken(pathToken)) { continue; } else if (isReverseToken(pathToken)) {
                final int size = newTokens.size();
                if (size == 0) {
                    throw VFSMessages.MESSAGES.onRootPath();
                }
                newTokens.remove(size - 1);
            } else { newTokens.add(pathToken); }
        }
        return newTokens;
    }
852803
protected void addResource(String path) {

        CmsPathSelectField field = new CmsPathSelectField();
        field.setCmsObject(m_cms);
        field.setUseRootPaths(true);
        field.setValue(path);
        field.addValueChangeListener(new ValueChangeListener() {

            private static final long serialVersionUID = 8646438704383992571L;

            public void valueChange(ValueChangeEvent event) {

                setOkButtonEnabled(true);

            }
        });
        m_componentsToValidate.add(field);
        CmsRemovableFormRow<CmsPathSelectField> row = new CmsRemovableFormRow<CmsPathSelectField>(
            field,
            CmsVaadinUtils.getMessageText(Messages.GUI_DATABASEAPP_SYNC_REMOVE_RESOURCE_0));
        row.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_DATABASEAPP_SYNC_RESOURCE_0));
        row.setRemoveRunnable(new Runnable() {

            public void run() {

                setOkButtonEnabled(true);
            }
        });
        m_resources.addComponent(row);
    }