public class WidgetInstanceHolder extends Object
widget instances
.Constructor and Description |
---|
WidgetInstanceHolder(String interfaceInstanceId,
boolean temporary,
String userId,
String contentId)
Creates a new widget instance holder.
|
Modifier and Type | Method and Description |
---|---|
WidgetInstance |
addWidgetInstance(String widgetContentId)
Appends a new widget instance in this holder.
|
WidgetInstance |
addWidgetInstance(String widgetContentId,
int position)
Adds a new widget instance in this holder in the specified position.
|
static WidgetInstanceHolder |
findByProperties(String interfaceInstanceId,
boolean temporary,
String userId,
String contentId)
Returns the widget instance holder for the specified properties.
|
String |
getContentId()
Returns the identifier of the content this holder is personalized for.
|
String |
getId()
Returns the identifier of this holder.
|
String |
getInterfaceInstanceId()
Returns the identifier of the service interface instance this holder belongs to.
|
String |
getUserId()
Returns the identifier of the user this holder is personalized for.
|
List<HolderWidgetInstance> |
getWidgetInstances()
Returns the persistent list with the widget instances in this holder.
|
boolean |
isTemporary()
Returns whether this holder is temporary.
|
void |
remove() |
void |
setTemporary(boolean temporary)
Sets whether this holder is temporary.
|
public WidgetInstanceHolder(String interfaceInstanceId, boolean temporary, String userId, String contentId)
interfaceInstanceId
- the holder interface instance identifier.temporary
- if this holder is temporary.userId
- the related user identifier if this holder is personalized for him, null
otherwise.contentId
- the related content identifier this holder is related for, null
otherwise.public String getId()
public String getInterfaceInstanceId()
public boolean isTemporary()
true
if it is temporary, false
otherwise.public void setTemporary(boolean temporary)
temporary
- true
if it is temporary, false
otherwise.public String getUserId()
null
if it is not personalized for a user.public String getContentId()
null
if it is not personalized for a content.public List<HolderWidgetInstance> getWidgetInstances()
Caution must be taken when modifying this list to prevent inconsistency. When add/move/remove methods in
WidgetInstanceHolder
instead.
public WidgetInstance addWidgetInstance(String widgetContentId)
widgetContentId
- the widget content identifier use to create the widget instance.public WidgetInstance addWidgetInstance(String widgetContentId, int position)
widgetContentId
- the widget content identifier use to create the widget instance.position
- the position, zero-based.public void remove() throws PortalException
PortalException
public static WidgetInstanceHolder findByProperties(String interfaceInstanceId, boolean temporary, String userId, String contentId)
interfaceInstanceId
- the value for getInterfaceInstanceId()
.temporary
- the value for isTemporary()
.userId
- the value for getUserId()
.contentId
- the value for contentId
.null
if not found.LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.