Skip navigation links


com.bea.netuix.application.transform.disassembler.xip
Class ImportContext

java.lang.Object
  extended by com.bea.netuix.application.transform.disassembler.xip.ExportImportContext
      extended by com.bea.netuix.application.transform.disassembler.xip.ImportContext

All Implemented Interfaces
Serializable

public class ImportContext
extends ExportImportContext

This context is used to define rules when importing a resource into the database from a portal file (.portal, .pinc, .book, or .page).

Import options - these options are used as rules to the export/import utility<P/> scope - Changes can be scoped to the "library", "admin", or "visitor" when importing a .pinc, .book, or .page file, and "admin" or "visitor" when exporting a .portal file. If this property has a value of "admin" or "visitor" then a xip.identifier.portal.path and xip.identifier.desktop.path must be specified. To scope exports to the "library" or "admin" you must be in the Admin or PortalSystemAdministrator Role.<P/> doDeletes - If true, then books, pages and portlets that are currently on the existing desktop in the database but not in the new import file will be removed from existing desktop.<P/> doMoves - (InnerMoves) If true, then existing books, pages and portlets that are in different locations on the same parent will be moved to the correct location. If you want to move books, pages and portlets across different parents then see outerMoves<P/> doOuterMoves - If true, then existing books, pages and portlets that are moved from different parents will be moved to the new parent. If this is not set then it will be handled as a remove and add (different customizations are lost).<P/> doUpdates - If true, then books, pages and portlets that are currently not on the existing desktop will be added, and any instance attributes on the books, page, and portlet will be updated in the database.<P/> abortIfPortletsMissing - if true, then if the new file references a portlet that is not in the current webapp then abort, otherwise skip the portlet and continue on.<P/> modifyDefinitions - If this flag is set to true then any changes in the import file will affect the definitions and not just the instances. These include things like markup (backing files, rollover images, isHidden; for a more complete list refer to the database schema). It is important to note that these changes may affect other desktops outside the one you are scoping it to.<P/> propagate - Typically all changes that are made to Library artifacts are cascaded down to the admin's desktop and subsequently cascaded down to the visitor's view. If this property is set to CustomizationContext.PROLIFERATE_SYNC then these changes will occur synchronously as part of this transaction. If this property is set to CustomizationContext.PROLIFERATE_OFF then changes will not get cascaded for the artifacts which have been modified. For books, pages and portlets that have not been modified at the admin or visitor level, then these will always receive the changes as they point to the default. If this property is set to CustomizationContext.PROLIFERATE_ASYNC then these changes will occur asynchronously.<P/> createPortal - If this flag is set, then when importing a desktop and the given portal is not already created, one will be created for you.<P/> portalTitle - If createPortalis set and a new portal is being created it needs a title. This property value will be the new portal's title.<P/> locale - the locale of the titles and descriptions in the file. Note the encoding is defined in the file itself.<P/> proliferatePreferences - When portlet preference changes are made to an library or admin instance, it's possible to indicate whether these changes should be pushed down through to the visitors. Setting this property to true (default) does just that. Setting this property to false only makes changes to preferences user's have not yet customized.

See Also
Serialized Form

Field Summary
static String DEFAULT_PORTAL_TITLE
           
static short PROLIFERATE_ASYNC
          Do not propagate changes to instances asynchronously.
static short PROLIFERATE_OFF
          Do not propagate changes to instances.
static short PROLIFERATE_SYNC
          Do not propagate changes to instances synchronously, as part of the same transaction as the update.
static short PROPAGATE_OFF
          Deprecated use ImportContext.PROLIFERATE_OFF
static short PROPAGATE_SYNC
          Deprecated use ImportContext.PROLIFERATE_SYNC

 

Fields inherited from class com.bea.netuix.application.transform.disassembler.xip.ExportImportContext
ADMIN_SCOPE, DEFAULT_LOCALE, LIBRARY_SCOPE, locale, scope, VISITOR_SCOPE

 

Constructor Summary
ImportContext()
           

 

Method Summary
 boolean abortIfPortletsMissing()
           
 void addPreferenceDestinationMaster(String definitionLabel, List<String> preferenceKeys)
          Add a preference key for the given portlet to be left alone on the destination.
 Object clone()
           
 boolean createPortal()
           
 boolean doDeletes()
           
 boolean doMoves()
           
 boolean doOuterMoves()
           
 boolean doUpdates()
           
 boolean getHadError()
          Was there an error? This field is set after the import operation has been completed.
 String getPortalTitle()
           
 List<String> getPreferenceDestinationMaster(String definitionLabel)
          Return the preference key names for the preferences that should be left alone on the destination
 short getProliferateChanges()
           
 short getPropagateChanges()
          Deprecated use getProliferateChanges()
 boolean getSuppressErrorMessages()
           
 String getUsername()
           
 boolean isProliferatePreferences()
           
 boolean modifyDefinitions()
           
 void setAbortIfPortletsMissing(boolean abortIfPortletsMissing)
           
 void setCreatePortal(boolean createPortal)
           
 void setDoDeletes(boolean doDeletes)
           
 void setDoMoves(boolean doMoves)
           
 void setDoOuterMoves(boolean doOuterMoves)
           
 void setDoUpdates(boolean doUpdates)
           
 void setHadError(boolean hadError)
           
 void setModifyDefinitions(boolean modifyDefinitions)
           
 void setPortalTitle(String portalTitle)
           
 void setProliferateChanges(short proliferateChanges)
           
 void setProliferatePreferences(boolean proliferatePreferences)
           
 void setPropagateChanges(short propagateChanges)
          Deprecated use setProliferateChanges(short )
 void setSuppressErrorMessages(boolean suppressErrorMessages)
           
 void setUsername(String username)
           

 

Methods inherited from class com.bea.netuix.application.transform.disassembler.xip.ExportImportContext
getLocale, getScope, setLocale, setLocale, setScope

 

Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

DEFAULT_PORTAL_TITLE

public static final String DEFAULT_PORTAL_TITLE
See Also
Constants Summary

PROPAGATE_OFF

@Deprecated
public static final short PROPAGATE_OFF
Deprecated use ImportContext.PROLIFERATE_OFF
See Also
Constants Summary

PROPAGATE_SYNC

@Deprecated
public static final short PROPAGATE_SYNC
Deprecated use ImportContext.PROLIFERATE_SYNC
See Also
Constants Summary

PROLIFERATE_OFF

public static final short PROLIFERATE_OFF
Do not propagate changes to instances.
See Also
Constants Summary

PROLIFERATE_SYNC

public static final short PROLIFERATE_SYNC
Do not propagate changes to instances synchronously, as part of the same transaction as the update.
See Also
Constants Summary

PROLIFERATE_ASYNC

public static final short PROLIFERATE_ASYNC
Do not propagate changes to instances asynchronously.
See Also
Constants Summary

Constructor Detail

ImportContext

public ImportContext()

Method Detail

doDeletes

public boolean doDeletes()

setDoDeletes

public void setDoDeletes(boolean doDeletes)

doMoves

public boolean doMoves()

setDoMoves

public void setDoMoves(boolean doMoves)

doOuterMoves

public boolean doOuterMoves()

setDoOuterMoves

public void setDoOuterMoves(boolean doOuterMoves)

doUpdates

public boolean doUpdates()

setDoUpdates

public void setDoUpdates(boolean doUpdates)

abortIfPortletsMissing

public boolean abortIfPortletsMissing()

setAbortIfPortletsMissing

public void setAbortIfPortletsMissing(boolean abortIfPortletsMissing)

getProliferateChanges

public short getProliferateChanges()

setProliferateChanges

public void setProliferateChanges(short proliferateChanges)

getPropagateChanges

@Deprecated
public short getPropagateChanges()
Deprecated use getProliferateChanges()

setPropagateChanges

@Deprecated
public void setPropagateChanges(short propagateChanges)
Deprecated use setProliferateChanges(short )

setModifyDefinitions

public void setModifyDefinitions(boolean modifyDefinitions)

modifyDefinitions

public boolean modifyDefinitions()

createPortal

public boolean createPortal()

setCreatePortal

public void setCreatePortal(boolean createPortal)

getPortalTitle

public String getPortalTitle()

setPortalTitle

public void setPortalTitle(String portalTitle)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getSuppressErrorMessages

public boolean getSuppressErrorMessages()

setSuppressErrorMessages

public void setSuppressErrorMessages(boolean suppressErrorMessages)

isProliferatePreferences

public boolean isProliferatePreferences()

setProliferatePreferences

public void setProliferatePreferences(boolean proliferatePreferences)

getHadError

public boolean getHadError()
Was there an error? This field is set after the import operation has been completed. Check the logs for more info if true. NOTE: this works only if the import context was passed by reference (XIP caller and XIP in the same JVM).

setHadError

public void setHadError(boolean hadError)

getPreferenceDestinationMaster

public List<String> getPreferenceDestinationMaster(String definitionLabel)
Return the preference key names for the preferences that should be left alone on the destination
Parameters
definitionLabel - the definition of the portlet
Returns
array of preference key names for the given portlet that shoudl not be changed in production. If no such preferences exist then return null;

addPreferenceDestinationMaster

public void addPreferenceDestinationMaster(String definitionLabel,
                                           List<String> preferenceKeys)
Add a preference key for the given portlet to be left alone on the destination.
Parameters
definitionLabel - definition label of the portlet. You can use the wildecard "*" to denote all portlets.
preferenceKeys - preference key names

clone

public Object clone()
Overrides:
clone in class Object

Skip navigation links


Copyright © 2010, Oracle. All rights reserved.