public class CSNUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
auditLogOperation |
static String |
dataChangeLogOperation |
static String |
entitySemantics |
static String |
Semantics |
| Constructor and Description |
|---|
CSNUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkVirtualElement(String propName,
Set<String> virtualElements) |
static Map<String,AdminDataAnnotation> |
getAdminDataMapForCreate(String serviceName,
String entityName,
boolean userContextPresent) |
static Map<String,AdminDataAnnotation> |
getAdminDataMapForDeepCreate(String serviceName,
String parentEntityName,
String assoEntityName,
String entityName,
boolean userContextPresent) |
static Map<String,AdminDataAnnotation> |
getAdminDataMapForUpdate(String serviceName,
String entityName,
boolean userContextPresent) |
static List<String> |
getAggregationColumns(String serviceName,
String entityName) |
static String |
getAggregationRefElement(String serviceName,
String element,
String entity) |
static List<String> |
getAllColumns(String serviceName,
String entityName) |
static AuthorizationDetails |
getAuthorizationDetails(String serviceOrEntityName)
Reads authorization (@requires/@restrict) details of the given service/entity
name from CSN.json.
|
static String |
getCDSDataType(String entityName,
String serviceName,
String propName) |
static String |
getCDSParamDataType(String entityName,
String serviceName,
String paramName) |
static String |
getcompositionPath(String serviceName,
String root,
String element) |
static Map<String,List<String>> |
getCompositionTree(String serviceName,
String entityName) |
static com.fasterxml.jackson.databind.JsonNode |
getCsn()
Returns the csn for the current call.
|
static InputStream |
getCsnAsInputStream() |
static InputStream |
getCsnAsInputStream(com.fasterxml.jackson.databind.JsonNode csn) |
static Map<String,AdminDataAnnotation> |
getDataMapForCoreComputed(String serviceName,
String entityName) |
static Map<String,AdminDataAnnotation> |
getDataMapForCoreImmutable(String serviceName,
String entityName) |
static Map<String,List<String>> |
getDraftTree(String serviceName) |
static String |
getEntityName(String serviceName,
String parentEntityName,
String associationName) |
static String |
getEtagProperty(String fullyQualifiedEntityName) |
static HashedData |
getHashedCsn() |
static List<String> |
getKeys(String serviceName,
String element) |
static String |
getNavName(String serviceName,
String entityName,
String targetNav) |
static List<Map<String,String>> |
getOrderByProperties(String serviceName,
String entityName) |
static String |
getPersistenceName(String fqEntityName,
String elementName)
Returns the value @cds.persistence.name annotation if present in the csn for
the passed element.
|
static Set<String> |
getProperties(String serviceName,
String entityName) |
static Long |
getQueryLimit(String serviceName) |
static Map<String,List<String>> |
getReferences(String serviceName,
String entityName) |
static Map<String,List<String>> |
getReferences(String serviceName,
String entityName,
boolean readCompositionsOnly) |
static Map<String,String> |
getReferentialConstarint(String serviceName,
String entityName,
String navigation) |
static List<String> |
getRootEntitiesWithDeltaEnabled(String serviceName,
String entityName) |
static List<String> |
getSearchableProperties(String serviceName,
String entityName) |
static Map<String,Double> |
getSearchablePropertiesWithFuzzy(String serviceName,
String entityName) |
static Integer |
getSnapshotStorageDays() |
static String |
getTemporalDataType(String serviceName) |
static List<String> |
getTemporalEntities(String serviceName) |
static Set<String> |
getVirtualElement(String serviceName,
String entityName) |
static boolean |
isAggregatedEntity(String serviceName,
String entityName) |
static boolean |
isAnyTemporal(String serviceName,
String entitySetName) |
static boolean |
isAuditLogEnabled(String serviceName,
String entityName,
String operation) |
static boolean |
isAutoExposed(String entityName,
String serviceName) |
static boolean |
isAutoExposedAndAutoExpose(String entityName,
String serviceName) |
static boolean |
isConsistentPagingEnabled(String serviceName,
String entityName) |
static boolean |
isConsistentPagingOrDeltaEnabled() |
static boolean |
isCreatable(String serviceName,
String entityName) |
static boolean |
isDefaultOrderEnabled(String entityName,
String serviceName) |
static boolean |
isDeletable(String serviceName,
String entityName) |
static boolean |
isDeltaEnabled(String serviceName,
String entityName) |
static boolean |
isDraftEnabledEntity(String entityName,
String serviceName) |
static boolean |
isDraftNodeEntity(String entityName,
String serviceName) |
static boolean |
isEntityTemporal(String serviceName,
String entitySetName) |
static boolean |
isHdbcdsMapping() |
static Boolean |
isLocalized(String serviceName,
String entityName) |
static Boolean |
isLocalizedForDraft(String serviceName,
String entityName) |
static boolean |
isPlainSqlMapping() |
static boolean |
isTemporal(String serviceName,
String requestURL) |
static boolean |
isUpdatable(String serviceName,
String entityName) |
public static final String entitySemantics
public static final String auditLogOperation
public static final String Semantics
public static final String dataChangeLogOperation
public static boolean isCreatable(String serviceName, String entityName) throws CSNNotSetException
CSNNotSetExceptionpublic static InputStream getCsnAsInputStream() throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic static InputStream getCsnAsInputStream(com.fasterxml.jackson.databind.JsonNode csn) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic static boolean isUpdatable(String serviceName, String entityName) throws CSNNotSetException
CSNNotSetExceptionpublic static boolean isDeletable(String serviceName, String entityName) throws CSNNotSetException
CSNNotSetExceptionpublic static Map<String,AdminDataAnnotation> getAdminDataMapForCreate(String serviceName, String entityName, boolean userContextPresent)
public static Map<String,AdminDataAnnotation> getAdminDataMapForDeepCreate(String serviceName, String parentEntityName, String assoEntityName, String entityName, boolean userContextPresent)
public static Map<String,AdminDataAnnotation> getAdminDataMapForUpdate(String serviceName, String entityName, boolean userContextPresent)
public static List<String> getSearchableProperties(String serviceName, String entityName)
public static Map<String,Double> getSearchablePropertiesWithFuzzy(String serviceName, String entityName)
public static boolean isPlainSqlMapping()
public static boolean isHdbcdsMapping()
public static String getEntityName(String serviceName, String parentEntityName, String associationName)
public static AuthorizationDetails getAuthorizationDetails(String serviceOrEntityName)
serviceOrEntityName - IllegalArgumentException - - If conversion fails due to incompatible
type; check CSN.json and
AuthorizationDetails- class.public static String getPersistenceName(String fqEntityName, String elementName)
fqEntityName - elementName - public static boolean isDraftEnabledEntity(String entityName, String serviceName)
public static boolean isDefaultOrderEnabled(String entityName, String serviceName)
public static String getCDSDataType(String entityName, String serviceName, String propName)
public static com.fasterxml.jackson.databind.JsonNode getCsn()
public static HashedData getHashedCsn()
public static Map<String,List<String>> getCompositionTree(String serviceName, String entityName)
public static boolean isConsistentPagingEnabled(String serviceName, String entityName)
public static Boolean isLocalizedForDraft(String serviceName, String entityName)
public static List<String> getRootEntitiesWithDeltaEnabled(String serviceName, String entityName)
public static String getcompositionPath(String serviceName, String root, String element)
public static List<Map<String,String>> getOrderByProperties(String serviceName, String entityName)
public static List<String> getAggregationColumns(String serviceName, String entityName)
public static boolean isAutoExposedAndAutoExpose(String entityName, String serviceName)
public static Map<String,List<String>> getReferences(String serviceName, String entityName, boolean readCompositionsOnly)
public static Map<String,List<String>> getReferences(String serviceName, String entityName)
public static Integer getSnapshotStorageDays()
public static boolean isConsistentPagingOrDeltaEnabled()
public static boolean isAuditLogEnabled(String serviceName, String entityName, String operation)
public static Map<String,AdminDataAnnotation> getDataMapForCoreComputed(String serviceName, String entityName)
public static Map<String,AdminDataAnnotation> getDataMapForCoreImmutable(String serviceName, String entityName)
public static Set<String> getVirtualElement(String serviceName, String entityName)
public static boolean checkVirtualElement(String propName, Set<String> virtualElements)
public static String getAggregationRefElement(String serviceName, String element, String entity)
public static String getCDSParamDataType(String entityName, String serviceName, String paramName)
Copyright © 2020 SAP. All Rights Reserved.