Class ServiceInterfaceStyleConfig
- java.lang.Object
-
- lumis.portal.serviceinterface.style.ServiceInterfaceStyleConfig
-
- All Implemented Interfaces:
Cloneable
,ICloneableConfig<ServiceInterfaceStyleConfig>
@StableMinor(version="14.2", sinceVersion="4.0") public class ServiceInterfaceStyleConfig extends Object implements ICloneableConfig<ServiceInterfaceStyleConfig>
Value class for Service Interface Style properties- Since:
- 4.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServiceInterfaceStyleConfig.IsolationLevel
Represents the level of isolation of a Style.
-
Field Summary
Fields Modifier and Type Field Description protected String
description
protected String
filePath
protected String
id
protected boolean
isFromDefinition
protected Collection<String>
isolationAllowedConsumers
protected ServiceInterfaceStyleConfig.IsolationLevel
isolationLevel
protected boolean
isWidgetDefault
protected String
name
protected String
serviceInterfaceId
-
Constructor Summary
Constructors Constructor Description ServiceInterfaceStyleConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceInterfaceStyleConfig
clone()
void
deserialize(Node serviceInstanceNode)
Deserialize the properties of the ServiceInstanceStyleConfig from the specified XML Node.boolean
equals(Object obj)
String
getDescription()
String
getFilePath()
String
getId()
Collection<String>
getIsolationAllowedConsumers()
Returns a list of identifiers of elements that are allowed to use this style.ServiceInterfaceStyleConfig.IsolationLevel
getIsolationLevel()
Returns the isolation level for this style.boolean
getIsWidgetDefault()
Returns the isWidgetDefault.String
getName()
String
getServiceInterfaceId()
int
hashCode()
boolean
isFromDefinition()
void
serialize(ServiceInterfaceStyleConfig styleConfig, OutputStream outputStream)
Serializes the interface style config to the specified output stream.void
setDescription(String description)
void
setFilePath(String filePath)
void
setFromDefinition(boolean isFromDefinition)
void
setId(String id)
void
setIsolation(ServiceInterfaceStyleConfig.IsolationLevel isolationLevel, Collection<String> allowedConsumers)
Sets the isolationLevel.void
setIsWidgetDefault(boolean isWidgetDefault)
Sets the isWidgetDefault.void
setName(String name)
void
setServiceInterfaceId(String interfaceId)
-
-
-
Field Detail
-
id
protected String id
-
serviceInterfaceId
protected String serviceInterfaceId
-
name
protected String name
-
description
protected String description
-
filePath
protected String filePath
-
isFromDefinition
protected boolean isFromDefinition
-
isWidgetDefault
protected boolean isWidgetDefault
-
isolationAllowedConsumers
protected Collection<String> isolationAllowedConsumers
-
isolationLevel
protected ServiceInterfaceStyleConfig.IsolationLevel isolationLevel
-
-
Method Detail
-
getDescription
public String getDescription()
- Returns:
- Returns the description.
-
setDescription
public void setDescription(String description)
- Parameters:
description
- The description to set.
-
getFilePath
public String getFilePath()
- Returns:
- Returns the filePath.
-
setFilePath
public void setFilePath(String filePath)
- Parameters:
filePath
- The filePath to set.
-
getId
public String getId()
- Returns:
- Returns the id.
-
setId
public void setId(String id)
- Parameters:
id
- The id to set.
-
getServiceInterfaceId
public String getServiceInterfaceId()
- Returns:
- Returns the serviceInterfaceId.
-
setServiceInterfaceId
public void setServiceInterfaceId(String interfaceId)
- Parameters:
serviceInterfaceId
- The serviceInterfaceId to set.
-
isFromDefinition
public boolean isFromDefinition()
- Returns:
- Returns the isFromDefinition.
-
setFromDefinition
public void setFromDefinition(boolean isFromDefinition)
- Parameters:
isFromDefinition
- The isFromDefinition to set.
-
getName
public String getName()
- Returns:
- Returns the name.
-
setName
public void setName(String name)
- Parameters:
name
- The name to set.
-
serialize
public void serialize(ServiceInterfaceStyleConfig styleConfig, OutputStream outputStream) throws PortalException
Serializes the interface style config to the specified output stream.- Parameters:
pageConfig
-outputStream
-- Throws:
PortalException
- Since:
- 4.0.3
-
deserialize
public void deserialize(Node serviceInstanceNode) throws PortalException
Deserialize the properties of the ServiceInstanceStyleConfig from the specified XML Node.- Parameters:
serviceInstanceNode
-- Throws:
PortalException
- Since:
- 4.0.3
-
clone
public ServiceInterfaceStyleConfig clone() throws CloneNotSupportedException
- Specified by:
clone
in interfaceICloneableConfig<ServiceInterfaceStyleConfig>
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
setIsWidgetDefault
public void setIsWidgetDefault(boolean isWidgetDefault)
Sets the isWidgetDefault.- Parameters:
isWidgetDefault
- the isWidgetDefault value to set.- Since:
- 6.0.0
-
getIsWidgetDefault
public boolean getIsWidgetDefault()
Returns the isWidgetDefault.- Returns:
- the isWidgetDefault
- Since:
- 6.0.0
-
getIsolationLevel
public ServiceInterfaceStyleConfig.IsolationLevel getIsolationLevel()
Returns the isolation level for this style.- Returns:
- the isolation level.
- Since:
- 6.2.0
-
setIsolation
public void setIsolation(ServiceInterfaceStyleConfig.IsolationLevel isolationLevel, Collection<String> allowedConsumers) throws IsolationLevelValidationException, PortalException
Sets the isolationLevel. This method validates the rules of isolation. If any error of validation occurs anIsolationLevelValidationException
is raised.- Parameters:
isolationLevel
- the isolation level.allowedConsumers
- collection with the identifiers of the consumers allowed to use this style. IfisolationLevel
isServiceInterfaceStyleConfig.IsolationLevel.ISOLATED
, it must be a single interface instance identifier; IfisolationLevel
isServiceInterfaceStyleConfig.IsolationLevel.SHARED
, it must be the identifiers of the service instances that can use the style.- Throws:
IsolationLevelValidationException
- if any rule of validation is invalid.PortalException
- if any error occurs during the process.- Since:
- 6.2.0
-
getIsolationAllowedConsumers
public Collection<String> getIsolationAllowedConsumers()
Returns a list of identifiers of elements that are allowed to use this style.If the isolation level is
ServiceInterfaceStyleConfig.IsolationLevel.PUBLIC
the returned collection is empty.If the isolation level is
ServiceInterfaceStyleConfig.IsolationLevel.ISOLATED
the returned collection contains a single interface instance identifier.If the isolation level is
ServiceInterfaceStyleConfig.IsolationLevel.SHARED
the returned collection contains the identifiers of service instances.- Returns:
- the consumers identifiers, as explained above.
- Since:
- 6.2.0
-
-