public String build()

in deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java [345:387]


        public String build(View view, ViewConfigNode viewConfigNode)
        {
            String basePath = view.basePath();
            Class source = viewConfigNode.getSource();

            if (("".equals(basePath) || basePath == null) &&
                    ViewConfigPreProcessor.isView(source) /*only calc the path for real pages*/)
            {
                this.defaultValueReplaced = true;

                basePath = NamingConventionUtils.toPath(viewConfigNode.getParent());
            }

            if (basePath != null && basePath.startsWith("."))
            {
                basePath = NamingConventionUtils.toPath(viewConfigNode.getParent()) + basePath.substring(1);

                this.defaultValueReplaced = true;
            }

            if (basePath != null && !basePath.startsWith(".") && !basePath.startsWith("/"))
            {
                basePath = NamingConventionUtils.toPath(viewConfigNode.getParent()) + basePath;

                this.defaultValueReplaced = true;
            }

            if (basePath != null && !basePath.endsWith("/"))
            {
                basePath = basePath + "/";

                this.defaultValueReplaced = true;
            }

            if (basePath != null && basePath.contains("//"))
            {
                basePath = basePath.replace("//", "/");

                this.defaultValueReplaced = true;
            }

            return basePath;
        }