获取根目录下面的pageviews目录中pathRefRootViews子目录下面的页面
@param pathRefRootViews 目录: 加入到/pageviews/pathRefRootViews下
@param pageName 页面名称
@return
163385
public static String getJSPPageViewFromRoot(String pathRefRootViews,String pageName){
		return getPageView(ROOT_DIR, PAGE_VIEW_PATH+pathRefRootViews, pageName, JSP);
	}
358571
public @Nullable Page getPage(@Nullable Predicate<Page> filter, @Nullable Page basePage) {
    List<Page> suffixPages = getPages(filter, basePage);
    if (suffixPages.isEmpty()) {
      return null;
    }
    else {
      return suffixPages.get(0);
    }
  }
1152474
public ArrayList<PathImpl> getPaths(ArrayList<PathImpl> paths)
  {
    PathListCallback cb = new PathListCallback(paths);

    filterPaths(cb);
    
    Collections.sort(paths);

    return paths;
  }
58600
public CmsAttributeHandler getHandlerByPath(String[] pathNames) {

        I_CmsAttributeHandler handler = this;
        int index = 0;
        for (int i = 0; i < pathNames.length; i++) {
            String attributeName = pathNames[i];
            int nextIndex = CmsContentDefinition.extractIndex(attributeName);
            attributeName = CmsContentDefinition.removeIndex(attributeName);
            if ((handler instanceof CmsAttributeHandler)
                && ((CmsAttributeHandler)handler).getAttributeType().isChoice()) {
                // in case of a choice attribute, skip to the next path name
                attributeName = CmsType.CHOICE_ATTRIBUTE_NAME;
                i++;
            }

            handler = handler.getChildHandler(attributeName, index);
            index = nextIndex;
        }

        return (CmsAttributeHandler)handler;
    }
555275
private Page findPage(final SecurityContext securityContext, List<Page> pages, final String path, final EditMode edit) throws FrameworkException {

		if (pages == null) {

			pages = StructrApp.getInstance(securityContext).nodeQuery(Page.class).getAsList();
			Collections.sort(pages, new GraphObjectComparator(StructrApp.key(Page.class, "position"), GraphObjectComparator.ASCENDING));
		}

		for (final Page page : pages) {

			final String pagePath = page.getPath();
			if (pagePath != null && pagePath.equals(path) && (EditMode.CONTENT.equals(edit) || isVisibleForSite(securityContext.getRequest(), page))) {

				return page;
			}
		}

		final String name     = PathHelper.getName(path);

		for (final Page page : pages) {

			final String pageName = page.getName();
			if (pageName != null && pageName.equals(name) && (EditMode.CONTENT.equals(edit) || isVisibleForSite(securityContext.getRequest(), page))) {

				return page;
			}
		}

		for (final Page page : pages) {

			final String pageUuid = page.getUuid();
			if (pageUuid != null && pageUuid.equals(name) && (EditMode.CONTENT.equals(edit) || isVisibleForSite(securityContext.getRequest(), page))) {

				return page;
			}
		}

		return null;
	}
697166
public String getViewPath(String className, String methodName, String viewName) {
    if (Strings.isNotEmpty(viewName)) {
      if (viewName.charAt(0) == Constants.separator) { return viewName; }
    }
    Profile profile = profileServie.getProfile(className);
    if (null == profile) { throw new RuntimeException("no convention profile for " + className); }
    StringBuilder buf = new StringBuilder();
    if (profile.getViewPathStyle().equals(Constants.FULL_VIEWPATH)) {
      buf.append(Constants.separator);
      buf.append(profile.getFullPath(className));
    } else if (profile.getViewPathStyle().equals(Constants.SIMPLE_VIEWPATH)) {
      buf.append(profile.getViewPath());
      // 添加中缀路径
      buf.append(profile.getInfix(className));
    } else if (profile.getViewPathStyle().equals(Constants.SEO_VIEWPATH)) {
      buf.append(profile.getViewPath());
      buf.append(Strings.unCamel(profile.getInfix(className)));
    } else {
      throw new RuntimeException(profile.getViewPathStyle() + " was not supported");
    }
    // add method mapping path
    buf.append(Constants.separator);
    if (Strings.isEmpty(viewName) || viewName.equals("success")) {
      viewName = methodName;
    }

    if (null == methodViews.get(viewName)) {
      buf.append(viewName);
    } else {
      buf.append(methodViews.get(viewName));
    }
    return buf.toString();
  }
799682
public void createPath(String pathName, String pathValue, String requestType) {
        try {
            int type = getRequestTypeFromString(requestType);
            String url = BASE_PATH;
            BasicNameValuePair[] params = {
                new BasicNameValuePair("pathName", pathName),
                new BasicNameValuePair("path", pathValue),
                new BasicNameValuePair("requestType", String.valueOf(type)),
                new BasicNameValuePair("profileIdentifier", this._profileName)
            };

            JSONObject response = new JSONObject(doPost(BASE_PATH, params));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
1244790
public static List<String> getSearchRootsForScope(
        CmsGallerySearchScope scope,
        String siteParam,
        String subSiteParam) {

        List<String> result = new ArrayList<String>();
        if (scope == CmsGallerySearchScope.everything) {
            result.add("/");
            return result;
        }
        if (scope.isIncludeSite()) {
            result.add(siteParam);
        }
        if (scope.isIncludeSubSite()) {
            if (subSiteParam == null) {
                result.add(siteParam);
            } else {
                result.add(CmsStringUtil.joinPaths(siteParam, subSiteParam));
            }
        }
        if (scope.isIncludeShared()) {
            String sharedFolder = OpenCms.getSiteManager().getSharedFolder();
            if (sharedFolder != null) {
                result.add(sharedFolder);
            }
            result.add(CmsSiteManagerImpl.PATH_SYSTEM_SHARED_FOLDER);
        }
        return result;
    }
831193
public static Page<Computer> page(int page, int pageSize, String sortBy, String order, String filter) {
        return 
            find.where()
                .ilike("name", "%" + filter + "%")
                .orderBy(sortBy + " " + order)
                .fetch("company")
                .findPagingList(pageSize)
                .getPage(page);
    }
461874
public @Nullable String getLinkRootPath(@NotNull Page page, @NotNull String linkTypeId) {
    if (StringUtils.equals(linkTypeId, InternalLinkType.ID)) {
      // inside an experience fragment it does not make sense to use a site root path
      if (Path.isExperienceFragmentPath(page.getPath())) {
        return DEFAULT_ROOT_PATH_CONTENT;
      }
      return AdaptTo.notNull(page.getContentResource(), SiteRoot.class).getRootPath(page);
    }
    else if (StringUtils.equals(linkTypeId, InternalCrossContextLinkType.ID)) {
      return DEFAULT_ROOT_PATH_CONTENT;
    }
    else if (StringUtils.equals(linkTypeId, MediaLinkType.ID)) {
      return DEFAULT_ROOT_PATH_MEDIA;
    }
    return null;
  }
1015139
String getDefaultView(String typeName) {

        String result = m_defaultViewRules.getViewForType(typeName);
        if (result == null) {
            result = "view_other";
            try {
                if (OpenCms.getResourceManager().hasResourceType(typeName)
                    && OpenCms.getResourceManager().getResourceType(typeName).isFolder()) {
                    result = "view_folders";
                }
            } catch (CmsLoaderException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        return result;
    }
886446
public Observable<Page<VpnSiteInner>> listByResourceGroupAsync(final String resourceGroupName) {
        return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
            .map(new Func1<ServiceResponse<Page<VpnSiteInner>>, Page<VpnSiteInner>>() {
                @Override
                public Page<VpnSiteInner> call(ServiceResponse<Page<VpnSiteInner>> response) {
                    return response.body();
                }
            });
    }
1090325
public static String getPageView(String dir, String viewPath, String pageName, String fileExtension){
		if (!dir.endsWith("/")) {
			dir = dir + "/";
		}
		if (!viewPath.endsWith("/")) {
			viewPath = viewPath + "/";
		}
		return dir+viewPath+pageName+fileExtension;
	}
49005
public static String searchFilePath(String fileName) {
        java.io.File dir = new java.io.File(System.getProperty("user.dir"));
        return recursiveSearch(dir, fileName);
    }
222780
public ListPage<FileInfo> listAllFileInfoForPrefixPage(URI prefix, String pageToken)
      throws IOException {
    logger.atFine().log("listAllFileInfoForPrefixPage(%s, %s)", prefix, pageToken);
    StorageResourceId prefixId = getPrefixId(prefix);
    ListPage<GoogleCloudStorageItemInfo> itemInfosPage =
        gcs.listObjectInfoPage(
            prefixId.getBucketName(), prefixId.getObjectName(), /* delimiter= */ null, pageToken);
    List<FileInfo> fileInfosPage = FileInfo.fromItemInfos(pathCodec, itemInfosPage.getItems());
    fileInfosPage.sort(FILE_INFO_PATH_COMPARATOR);
    return new ListPage<>(fileInfosPage, itemInfosPage.getNextPageToken());
  }
202154
public ResourceList getResourcesWithLeafName(final String leafName) {
        if (closed.get()) {
            throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
        }
        final ResourceList allWhitelistedResources = getAllResources();
        if (allWhitelistedResources.isEmpty()) {
            return ResourceList.EMPTY_LIST;
        } else {
            final ResourceList filteredResources = new ResourceList();
            for (final Resource classpathResource : allWhitelistedResources) {
                final String relativePath = classpathResource.getPath();
                final int lastSlashIdx = relativePath.lastIndexOf('/');
                if (relativePath.substring(lastSlashIdx + 1).equals(leafName)) {
                    filteredResources.add(classpathResource);
                }
            }
            return filteredResources;
        }
    }
783660
public ArrayList<View> getCustomViews(String viewName)
    {
        ArrayList<View> returnViews = new ArrayList<View>();
        for(View v: this.getViews())
        {
            if(v.getClass().getSimpleName().equals(viewName))
                returnViews.add(v);
        }

        return returnViews;
    }