INTEGRATION: CWS scriptingf10 (1.7.4); FILE MERGED

2005/01/10 12:03:46 toconnor 1.7.4.1: #i25269# add getChildContainerForUrl method for UNO package scripts
This commit is contained in:
Rüdiger Timm
2005-01-27 14:27:39 +00:00
parent 39103990aa
commit dae6a8ac74

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: ParcelContainer.java,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: vg $ $Date: 2004-12-23 11:49:27 $
* last change: $Author: rt $ $Date: 2005-01-27 15:27:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -177,10 +177,9 @@ public class ParcelContainer implements XNameAccess
}
/**
* Returns a child <tt>ParcelContainer</tt> whose member
* <tt>containerUrl</tt> matches the <tt>containerUrl</tt>
* argument passed to this method.
* @param containerUrl the <tt>containerUrl</tt> which is to
* Returns a child <tt>ParcelContainer</tt> whose location
* matches the <tt>location</tt> argument passed to this method.
* @param key the <tt>location</tt> which is to
* be matched.
*
* @return child <tt>ParcelContainer</tt> or <null> if none
@@ -206,6 +205,33 @@ public class ParcelContainer implements XNameAccess
return result;
}
/**
* Returns a child <tt>ParcelContainer</tt> whose member
* <tt>containerUrl</tt> matches the <tt>containerUrl</tt>
* argument passed to this method.
* @param containerUrl the <tt>containerUrl</tt> which is to
* be matched.
*
* @return child <tt>ParcelContainer</tt> or <null> if none
* found.
*/
public ParcelContainer getChildContainerForURL( String containerUrl )
{
ParcelContainer result = null;
Iterator iter = childContainers.iterator();
while ( iter.hasNext() )
{
ParcelContainer c = (ParcelContainer) iter.next();
if ( containerUrl.equals( c.containerUrl ) )
{
result = c;
break;
}
}
return result;
}
/**
* Returns Name of this container. Name of this <tt>ParcelContainer</tt>
* is determined from the <tt>containerUrl</tt> as the last portion
@@ -368,7 +394,7 @@ public class ParcelContainer implements XNameAccess
}
if ( parcel == null )
{
throw new com.sun.star.container.NoSuchElementException( aName );
throw new com.sun.star.container.NoSuchElementException( "Macro Library " + aName + " not found" );
}
return parcel;
}