com.sapportals.wcm.rfadapter

Class LinkDataPack

java.lang.Object
  extended bycom.sapportals.wcm.rfadapter.DataPack
      extended bycom.sapportals.wcm.rfadapter.LinkDataPack

public final class LinkDataPack
extends DataPack

combines all information needed to create an internal or external link in an ICollection. This class is immutable. If the target resource is itself a link, the data pack will use the IResource.getTargetResource() method to retrieve the target of that link. This target will then be used as target for the newly created link. This is only applicable, if the link to be created is of LinkType.INTERNAL


Constructor Summary
LinkDataPack(IPropertyMap properties, IResource target)
          convinience constructor to create a link of type LinkType.INTERNAL.
LinkDataPack(String name, IPropertyMap properties, IResource target)
          convinience constructor to create a link of type LinkType.INTERNAL.
LinkDataPack(String name, IPropertyMap properties, LinkType type, URL target, IResourceContext context)
          standard constructor for this class.
 
Method Summary
 DataPack add(IProperty property)
          creates a new DataPack object that is a 1:1 copy of this instance but with the given parameter as additional property.
 boolean generateDisplayNameProperty()
          returns false if it is an LinkType.INTERNAL For these internal links, the default link generation must not create a displayname property, if the target has a displayname, because the link should show its targets displayname as displayname.
 DataPack modify(IProperty property)
          creates a new DataPack object that is a 1:1 copy of this instance but with the given parameter as additional or modified property.
 URL target()
           
 LinkType type()
           
 
Methods inherited from class com.sapportals.wcm.rfadapter.DataPack
addProperty, modifyProperty, name, properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkDataPack

public LinkDataPack(String name,
                    IPropertyMap properties,
                    LinkType type,
                    URL target,
                    IResourceContext context)
standard constructor for this class. Other constructors will call this one internally

Parameters:
name - the name the link should have, must not be null
properties - properties to be set for the link, might be null
type - specifies if a link to an object within the repository framework LinkType.INTERNAL or to an object outside the framework, LinkType.EXTERNAL, should be created. Must not be null
target - the adress of the object the link should point at. Must not be null

LinkDataPack

public LinkDataPack(String name,
                    IPropertyMap properties,
                    IResource target)
             throws ResourceException
convinience constructor to create a link of type LinkType.INTERNAL. The needed URL object will be created using the given target's RID

Parameters:
name - the name the link should have, must not be null
properties - properties to be set for the link, might be null
target - the IResource the link should point at, msut not be null
Throws:
ResourceException, - if the target's RID is not retrievable
ResourceException

LinkDataPack

public LinkDataPack(IPropertyMap properties,
                    IResource target)
             throws ResourceException
convinience constructor to create a link of type LinkType.INTERNAL. The needed URL object will be created using the given target's RID, the name of the link will be the name of the target

Parameters:
properties - properties to be set for the link, might be null
target - the IResource the link should point at, msut not be null
Throws:
ResourceException, - if the target's RID is not retrievable
ResourceException
Method Detail

generateDisplayNameProperty

public boolean generateDisplayNameProperty()
returns false if it is an LinkType.INTERNAL For these internal links, the default link generation must not create a displayname property, if the target has a displayname, because the link should show its targets displayname as displayname. For external links, a displayname property is wanted, because the external link cannot be used as a displayname-provider.

Overrides:
generateDisplayNameProperty in class DataPack
Returns:

type

public LinkType type()

target

public URL target()

modify

public DataPack modify(IProperty property)
Description copied from class: DataPack
creates a new DataPack object that is a 1:1 copy of this instance but with the given parameter as additional or modified property. If the property is null, all values will be equal.

Specified by:
modify in class DataPack
Parameters:
property - the property to modify for the new datapack, might be null
Returns:
a new DataPack object

add

public DataPack add(IProperty property)
Description copied from class: DataPack
creates a new DataPack object that is a 1:1 copy of this instance but with the given parameter as additional property. If the property is null, all values will be equal.

Specified by:
add in class DataPack
Parameters:
property - the property to add for the new datapack, might be null
Returns:
a new DataPack object


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.