@Component(value="cuba_RestControllerUtils")
public class RestControllerUtils
extends java.lang.Object
Constructor and Description |
---|
RestControllerUtils() |
Modifier and Type | Method and Description |
---|---|
void |
applyAttributesSecurity(Entity entity)
By default entity is loaded from the middleware with the attributes that are not allowed for reading according
to roles permissions.
|
MetaClass |
getMetaClass(java.lang.String entityName)
Finds metaClass by entityName.
|
View |
getView(MetaClass metaClass,
java.lang.String viewName)
Finds a view for a given metaClass.
|
java.lang.String |
transformEntityNameIfRequired(java.lang.String entityName,
java.lang.String modelVersion,
JsonTransformationDirection direction) |
java.lang.String |
transformJsonIfRequired(java.lang.String entityName,
java.lang.String modelVersion,
JsonTransformationDirection direction,
java.lang.String json) |
public MetaClass getMetaClass(java.lang.String entityName)
public View getView(MetaClass metaClass, java.lang.String viewName)
public void applyAttributesSecurity(Entity entity)
entity
- the entity. After the method is executed forbidden attributes will be cleaned.public java.lang.String transformEntityNameIfRequired(java.lang.String entityName, java.lang.String modelVersion, JsonTransformationDirection direction)
public java.lang.String transformJsonIfRequired(java.lang.String entityName, java.lang.String modelVersion, JsonTransformationDirection direction, java.lang.String json)