* Meine Author Angaben korrigiert
git-svn-id: https://svn.libreccm.org/ccm/trunk@2425 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c60db860b3
commit
075bd1c6d7
|
|
@ -9,11 +9,17 @@ import com.arsdigita.kernel.ACSObject;
|
||||||
import com.arsdigita.navigation.AbstractNavigationModel;
|
import com.arsdigita.navigation.AbstractNavigationModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A subsite aware navigation model for search application
|
||||||
*
|
*
|
||||||
* @author Sören Bernstein (quasimodo) <sbernstein@zes.uni-bremen.de>
|
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||||
*/
|
*/
|
||||||
public class SearchNavigationModel extends AbstractNavigationModel {
|
public class SearchNavigationModel extends AbstractNavigationModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the index item of the current category
|
||||||
|
*
|
||||||
|
* @return the index item, or null if there is no current category
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected ACSObject loadObject() {
|
protected ACSObject loadObject() {
|
||||||
Category category = getCategory();
|
Category category = getCategory();
|
||||||
|
|
@ -23,6 +29,11 @@ public class SearchNavigationModel extends AbstractNavigationModel {
|
||||||
return category.getIndexObject();
|
return category.getIndexObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current category
|
||||||
|
*
|
||||||
|
* @return the current category, or null if category path is empty
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Category loadCategory() {
|
protected Category loadCategory() {
|
||||||
Category[] path = getCategoryPath();
|
Category[] path = getCategoryPath();
|
||||||
|
|
@ -33,6 +44,12 @@ public class SearchNavigationModel extends AbstractNavigationModel {
|
||||||
return path[path.length - 1];
|
return path[path.length - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subsite aware loadCategoryPath method which uses {@link Subsite} to
|
||||||
|
* get the category path
|
||||||
|
*
|
||||||
|
* @return category path, or null if not subsite is active
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Category[] loadCategoryPath() {
|
protected Category[] loadCategoryPath() {
|
||||||
if (Subsite.getContext().hasSite()) {
|
if (Subsite.getContext().hasSite()) {
|
||||||
|
|
@ -45,6 +62,12 @@ public class SearchNavigationModel extends AbstractNavigationModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subsite aware loadRootCaegory method which uses {@link Subsite} to
|
||||||
|
* get root category
|
||||||
|
*
|
||||||
|
* @return root category, or null if no subsite is active
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Category loadRootCategory() {
|
protected Category loadRootCategory() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Sören Bernstein (quasimodo) <sbernstein@zes.uni-bremen.de>
|
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||||
*/
|
*/
|
||||||
public class SubsiteItemURLFinder extends ItemURLFinder {
|
public class SubsiteItemURLFinder extends ItemURLFinder {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue