Author: rfelden
Date: Tue Dec 11 16:40:14 2007
New Revision: 19363
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19363&repname=
=3Djahia
Log:
missing parts of the dynamic sitemap gwt module
(two new methods for a given page : getPageChildrenCount and pageHasChildre=
n)
Modified:
branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/services/page=
s/JahiaPageBaseService.java
branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/services/page=
s/JahiaPageService.java
Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/service=
s/pages/JahiaPageBaseService.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/java/org/jahia/services/pages/JahiaPageBaseService.ja=
va&rev=3D19363&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/services/page=
s/JahiaPageBaseService.java (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/services/page=
s/JahiaPageBaseService.java Tue Dec 11 16:40:14 2007
@@ -784,6 +784,39 @@
return childs;
}
=
+ public int getPageChildrenCount(int pageID, int loadFlag, JahiaUser us=
er)
+ throws JahiaException {
+
+ boolean directPageOnly =3D (( loadFlag & ( PageLoadFlags.ALL |
+ PageLoadFlags.INTERNAL |
+ PageLoadFlags.JAHIA |
+ PageLoadFlags.LINKS |
+ PageLoadFlags.URL ) )=3D=
=3D0 );
+
+ List contentPageChilds =3D getContentPageChilds(pageID,user,
+ (ContentPage.STAGING_PAGE_INFOS | Cont=
entPage.ACTIVE_PAGE_INFOS),
+ ContentObject.SHARED_LANGUAGE,directPa=
geOnly);
+
+ return contentPageChilds.size() ;
+ }
+
+ // TODO optimize method
+ public boolean pageHasChildren(int pageID, int loadFlag, JahiaUser use=
r)
+ throws JahiaException {
+
+ boolean directPageOnly =3D (( loadFlag & ( PageLoadFlags.ALL |
+ PageLoadFlags.INTERNAL |
+ PageLoadFlags.JAHIA |
+ PageLoadFlags.LINKS |
+ PageLoadFlags.URL ) )=3D=
=3D0 );
+
+ List contentPageChilds =3D getContentPageChilds(pageID,user,
+ (ContentPage.STAGING_PAGE_INFOS | Cont=
entPage.ACTIVE_PAGE_INFOS),
+ ContentObject.SHARED_LANGUAGE,directPa=
geOnly);
+
+ return contentPageChilds !=3D null && contentPageChilds.size() > 0=
;
+ }
+
/**
* Return an enumeration holding all the child PAGE(!) of the specifie=
d page.
* This method checks the rights for a user and loads only the pages a=
user
Modified: branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/service=
s/pages/JahiaPageService.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-INCLUD=
E-TAG-BRANCH/core/src/java/org/jahia/services/pages/JahiaPageService.java&r=
ev=3D19363&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/services/page=
s/JahiaPageService.java (original)
+++ branches/JAHIA-INCLUDE-TAG-BRANCH/core/src/java/org/jahia/services/page=
s/JahiaPageService.java Tue Dec 11 16:40:14 2007
@@ -113,7 +113,7 @@
/**
* Deletes a page information, and its contents (fields, containers, e=
tc.)
*
- * @param pageID The page to be deleted.
+ * @param theVictim The page to be deleted.
*
* @throws JahiaException Return this exception if any failure occured=
in the deletion
* process.
@@ -146,7 +146,7 @@
* class constants for more informaion.
* @param jParam Jahia parameters. This parameter can be set to
* null in case no dynamic context is needed.
- * @param theUser The current user, to check rights
+ * @param user The current user, to check rights
*
* @return a Vector of JahiaPage objects
*
@@ -348,6 +348,37 @@
throws JahiaException;
=
/**
+ * Return the number of subpages for a given JahiaPage. The returned v=
alue concerns only pages
+ * visible to the current user.
+ *
+ * @param pageID page unique identificaiton number
+ * @param loadFlag mask of page types to include in the count
+ * @param user the current user
+ * @return the number of subpages
+ * @throws JahiaException if any issue occured
+ */
+ public abstract int getPageChildrenCount(
+ int pageID,
+ int loadFlag,
+ JahiaUser user)
+ throws JahiaException;
+
+ /**
+ * Check if a given JahiaPage has children (only list pages available =
to the current user).
+ *
+ * @param pageID page unique identificaiton number
+ * @param loadFlag mask of page types to include in the count
+ * @param user the current user
+ * @return the number of subpages
+ * @throws JahiaException if any issue occured
+ */
+ public abstract boolean pageHasChildren(
+ int pageID,
+ int loadFlag,
+ JahiaUser user)
+ throws JahiaException;
+
+ /**
* Return an enumeration holding all the child PAGE(!) of the specifie=
d page.
* This method checks the rights for a user and loads only the pages a=
user
* is allowed to see.
@@ -355,7 +386,7 @@
* @param pageID The source page ID
* @param user A JahiaUser object for which to check the righ=
ts on the
* pages
- * @param pageInfoFlag, if Archived, return all
+ * @param pageInfosFlag, if Archived, return all
* @param languageCode, if null, return all language
*
* @return a Vector of JahiaPage objects that are the childs of this
@@ -464,7 +495,7 @@
* the specified page until the site's root page.
*
* @param pageID The page id
- * @param jParam Jahia parameter reference. Specify null if to
+ * @param jParams Jahia parameter reference. Specify null if to
* page context is needed.
*
* @return Return a valid Vector of JahiaPage objects defining the pat=
h.
@@ -840,7 +871,7 @@
/**
* returns a DOM representation of all pages of a site
*
- * @param int siteID
+ * @param siteID
*
* @auhtor NK
*/
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list