You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2004/11/03 20:40:14 UTC
cvs commit: jakarta-jetspeed-2/components/locator/src/java/org/apache/jetspeed/profiler/impl ProfileLocatorPropertyImpl.java JetspeedProfileLocator.java
taylor 2004/11/03 11:40:14
Modified: components/locator/src/java/org/apache/jetspeed/profiler/impl
ProfileLocatorPropertyImpl.java
JetspeedProfileLocator.java
Log:
profile criteria and locators can now have a isNavigation property to indicate that the property instructs the locator interpreter to navigate to an explicit folder using the property value as the location
Revision Changes Path
1.2 +15 -4 jakarta-jetspeed-2/components/locator/src/java/org/apache/jetspeed/profiler/impl/ProfileLocatorPropertyImpl.java
Index: ProfileLocatorPropertyImpl.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/locator/src/java/org/apache/jetspeed/profiler/impl/ProfileLocatorPropertyImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ProfileLocatorPropertyImpl.java 17 Sep 2004 20:02:03 -0000 1.1
+++ ProfileLocatorPropertyImpl.java 3 Nov 2004 19:40:14 -0000 1.2
@@ -31,24 +31,27 @@
private String value;
private String type;
private int fallbackType;
- private boolean isControl;
+ private boolean isControl = true;
+ private boolean isNavigation = false;
- public ProfileLocatorPropertyImpl(RuleCriterion criterion, boolean isControl, String value)
+ public ProfileLocatorPropertyImpl(RuleCriterion criterion, boolean isControl, boolean isNavigation, String value)
{
this.name = criterion.getName();
this.value = value;
this.type = criterion.getType();
this.fallbackType = criterion.getFallbackType();
this.isControl = isControl;
+ this.isNavigation = isNavigation;
}
- public ProfileLocatorPropertyImpl(String name, boolean isControl, String value)
+ public ProfileLocatorPropertyImpl(String name, boolean isControl, boolean isNavigation, String value)
{
this.name = name;
this.value = value;
this.type = ProfilingRule.STANDARD;
this.fallbackType = RuleCriterion.FALLBACK_CONTINUE;
this.isControl = isControl;
+ this.isNavigation = isNavigation;
}
/**
@@ -124,4 +127,12 @@
return isControl;
}
+ /**
+ * @return navigation classification flag
+ */
+ public boolean isNavigation()
+ {
+ return isNavigation;
+ }
+
}
1.3 +22 -7 jakarta-jetspeed-2/components/locator/src/java/org/apache/jetspeed/profiler/impl/JetspeedProfileLocator.java
Index: JetspeedProfileLocator.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed-2/components/locator/src/java/org/apache/jetspeed/profiler/impl/JetspeedProfileLocator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- JetspeedProfileLocator.java 15 Oct 2004 06:49:43 -0000 1.2
+++ JetspeedProfileLocator.java 3 Nov 2004 19:40:14 -0000 1.3
@@ -89,20 +89,35 @@
}
return false;
}
+
+ public boolean isNavigation(String name)
+ {
+ Iterator iter = elements.iterator();
+ while (iter.hasNext())
+ {
+ ProfileLocatorPropertyImpl element = (ProfileLocatorPropertyImpl)iter.next();
+ String elementName = element.getName();
+ if (elementName != null && elementName.equals(name))
+ {
+ return element.isNavigation();
+ }
+ }
+ return false;
+ }
- public void add(RuleCriterion criterion, boolean isControl, String value)
+ public void add(RuleCriterion criterion, boolean isControl, boolean isNavigation, String value)
{
- elements.add(new ProfileLocatorPropertyImpl(criterion, isControl, value));
+ elements.add(new ProfileLocatorPropertyImpl(criterion, isControl, isNavigation, value));
}
- public void add(String name, boolean isControl, String value)
+ public void add(String name, boolean isControl, boolean isNavigation, String value)
{
- elements.add(new ProfileLocatorPropertyImpl(name, isControl, value));
+ elements.add(new ProfileLocatorPropertyImpl(name, isControl, isNavigation, value));
}
public void add(String name, String value)
{
- add(name, true, value);
+ add(name, true, false, value);
}
public void createFromLocatorPath(String path)
@@ -115,7 +130,7 @@
if (tokenizer.hasMoreTokens())
{
String value = tokenizer.nextToken();
- this.add(name, true, value);
+ this.add(name, true, false, value);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org