|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlumis.portal.servicecontainer.ReplaceInterfacesStorage
public class ReplaceInterfacesStorage
Storage for replace interfaces.
Constructor Summary | |
---|---|
ReplaceInterfacesStorage(String replaceInterfacesStr)
Constructs a new storage with the given string. |
Method Summary | |
---|---|
Map<String,String> |
getMap()
Returns the replace map. |
protected String |
getReplaceInterfaceParametersParameterName()
|
String |
getStackTopByExistentItem(String item)
Returns the top of replace stack by a given item. |
String |
getStateString()
Returns the state of replace interface information as a string in the format for PortalRequestParameters.PAGE_PARAMETER_REPLACE_INTERFACES_STATE . |
String |
handleReplaceInterfaceOperations(String currentInterfaceInstanceId,
String[] replaceInterfaceOperations,
PortalRequestParameters parameters)
Handles the replace interface commands. |
String |
put(String source,
String target)
Creates a new replace mapping source -> target . |
String |
remove(String item)
Removes the given interface instance from the replace map (searching it as the mapping key). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReplaceInterfacesStorage(String replaceInterfacesStr) throws UnsupportedEncodingException
The string must be formatted as following:
originInterfaceInstance=destinationInterfaceInstance(;originInterfaceInstance=destinationInterfaceInstance)*
Where:
originInterfaceInstance
is the original interface instance.
destinationInterfaceInstance
is the interface instance that is replacing the original one.
null
or empty no interface instance is being replaced.
replaceInterfacesStr
- the string of replaces.
UnsupportedEncodingException
Method Detail |
---|
public String getStateString()
PortalRequestParameters.PAGE_PARAMETER_REPLACE_INTERFACES_STATE
.
PortalRequestParameters.PAGE_PARAMETER_REPLACE_INTERFACES_STATE
.public Map<String,String> getMap()
public String getStackTopByExistentItem(String item)
item
- the item used to search in the map.
public String remove(String item)
item
- the item to be removed.
Map.remove(Object)
.public String put(String source, String target)
source
-> target
.
source
- the interface instance that is going to be replaced.target
- the interface instance that is going to replace.
Map.put(Object, Object)
.public String handleReplaceInterfaceOperations(String currentInterfaceInstanceId, String[] replaceInterfaceOperations, PortalRequestParameters parameters) throws PortalException
PortalRequestParameters
if needed. Returns the result interface instance after
the commands are applied. The commands are formatted in a string array. Each command string may have multiple commands separated by a ',
' character.
The supported commands are:
r
: removes the current interface instance from the replaces map. After this command is executed, the current interface instance becomes the one that it was replacing.r
is executed, the current interface instance becomes II-1.
a
: this command adds a new replace mapping. It must be followed by the interface instance that is going to replace the current interface instance. After this command is
executed, the current interface instance becomes the given one.aII-2
is executed, the interface instance II-2 replaces the interface instance II-1
and II-2 becomes the current interface instance.
currentInterfaceInstanceId
- the current interface instance.replaceInterfaceOperations
- the replace commands array.parameters
- the replace interface parameters.
PortalException
protected String getReplaceInterfaceParametersParameterName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |