Replaced some System.out.printf outputs with a Logger
git-svn-id: https://svn.libreccm.org/ccm/trunk@4022 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
36521ec948
commit
6379aa2a7e
|
|
@ -32,14 +32,17 @@ import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Jens Pelzetter
|
* @author Jens Pelzetter
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class PublicPersonalProfileXmlUtil {
|
public class PublicPersonalProfileXmlUtil {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = Logger.getLogger(PublicPersonalProfileXmlUtil.class);
|
||||||
|
|
||||||
private final com.arsdigita.cms.publicpersonalprofile.PublicPersonalProfileConfig config =
|
private final com.arsdigita.cms.publicpersonalprofile.PublicPersonalProfileConfig config =
|
||||||
PublicPersonalProfiles.
|
PublicPersonalProfiles.
|
||||||
getConfig();
|
getConfig();
|
||||||
|
|
@ -180,22 +183,23 @@ public class PublicPersonalProfileXmlUtil {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ContentItem targetItem = link.getTargetItem();
|
final ContentItem targetItem = link.getTargetItem();
|
||||||
//System.out.printf("targetItem.getClass.getName: %s\n", targetItem.getClass().getName());
|
//System.out.printf("targetItem.getClass.getName: %s\n", targetItem.getClass().getName());
|
||||||
if ((targetItem instanceof PublicPersonalProfile)
|
if ((targetItem instanceof PublicPersonalProfile)
|
||||||
|| (targetItem instanceof ContentPage)) {
|
|| (targetItem instanceof ContentPage)) {
|
||||||
final ContentPage targetPage = (ContentPage) targetItem;
|
final ContentPage targetPage = (ContentPage) targetItem;
|
||||||
|
|
||||||
if (!(targetPage.getContentBundle().hasInstance(profile.getLanguage(),
|
if (!(targetPage.getContentBundle().hasInstance(profile.getLanguage(),
|
||||||
false))) {
|
false))) {
|
||||||
System.out.printf("No suitable language found. Continuing...\n");
|
LOGGER.warn("No suitable language found. Continuing...\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.printf("Creating navigation entry for %s\n", navLinkKey);
|
LOGGER.debug(String.format("Creating navigation entry for %s\n",
|
||||||
|
navLinkKey));
|
||||||
navLinks.add(createNavLink(navItem, navLinkKey, targetItem));
|
navLinks.add(createNavLink(navItem, navLinkKey, targetItem));
|
||||||
} else {
|
} else {
|
||||||
System.out.println("targetItem is not a PublicPersonalProfile and not a content item");
|
LOGGER.warn("targetItem is not a PublicPersonalProfile and not a content item");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue