protected List<EdmAction> createActions() { final List<EdmAction> edmActions = new ArrayList<EdmAction>(); final List<CsdlAction> providerActions = schema.getActions(); if (providerActions != null) { for (CsdlAction action : providerActions) { FullQualifiedName actionName = new FullQualifiedName(namespace, action.getName()); EdmActionImpl edmActionImpl = new EdmActionImpl(edm, actionName, action); edmActions.add(edmActionImpl); edm.cacheAction(actionName, edmActionImpl); } } return edmActions; }
/** * Creates the ActionImports. Function Imports have to be created for <i>unbound</i> actions. These are actions, * which do not depend on an entity set. E.g. .../MyAction(). <p> * Details are described in : <a href= * "http://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part3-csdl/odata-v4.0-errata02-os-part3-csdl- * complete.html#_Toc406398038">13.5 Element edm:ActionImport</a> * @param edmAc * @return */ private CsdlActionImport buildActionImport(CsdlAction edmAc) { final CsdlActionImport edmAcImport = new CsdlActionImport(); edmAcImport.setName(edmAc.getName()); edmAcImport.setAction(nameBuilder.buildFQN(edmAc.getName())); // edmAcImport.setEntitySet(entitySet) return edmAcImport; }
@Override public List<CsdlAction> getActions(final FullQualifiedName fqn) throws ODataException { ArrayList<CsdlAction> actions = new ArrayList<CsdlAction>(); CsdlSchema schema = getSchema(fqn.getNamespace()); if (schema != null) { List<CsdlAction> types = schema.getActions(); if (types != null) { for (CsdlAction type : types) { if (type.getName().equals(fqn.getName())) { actions.add(type); } } } } return actions; }
protected List<EdmAction> createActions() { final List<EdmAction> edmActions = new ArrayList<EdmAction>(); final List<CsdlAction> providerActions = schema.getActions(); if (providerActions != null) { for (CsdlAction action : providerActions) { FullQualifiedName actionName = new FullQualifiedName(namespace, action.getName()); EdmActionImpl edmActionImpl = new EdmActionImpl(edm, actionName, action); edmActions.add(edmActionImpl); edm.cacheAction(actionName, edmActionImpl); } } return edmActions; }
@Override public List<CsdlAction> getActions(final FullQualifiedName fqn) throws ODataException { ArrayList<CsdlAction> actions = new ArrayList<CsdlAction>(); CsdlSchema schema = getSchema(fqn.getNamespace()); if (schema != null) { List<CsdlAction> types = schema.getActions(); if (types != null) { for (CsdlAction type : types) { if (type.getName().equals(fqn.getName())) { actions.add(type); } } } } return actions; }
private void addActionImportAsProcedure(MetadataFactory mf, CsdlActionImport actionImport, ODataType odataType, XMLMetadata metadata) throws TranslatorException { List<CsdlAction> actions = getActions(metadata, actionImport.getAction()); for (CsdlAction action : actions) { if (!hasComplexParameters(action.getParameters())) { Procedure procedure = mf.addProcedure(action.getName()); addOperation(mf, metadata, odataType, action, procedure); } else { LogManager.logInfo(LogConstants.CTX_ODATA, ODataPlugin.Util.gs(ODataPlugin.Event.TEIID17033, action.getName())); } } }
for (CsdlAction csdlAction : csdlActions) { csdlActionsMap.put(new FullQualifiedName( csdlSchema.getNamespace(), csdlAction.getName()), csdlAction);
for (CsdlAction csdlAction : csdlActions) { csdlActionsMap.put(new FullQualifiedName( csdlSchema.getNamespace(), csdlAction.getName()), csdlAction);