com.sap.cds.adapter.odata.v4.ODataV4IndexContentProviderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cds-adapter-odata-v4 Show documentation
Show all versions of cds-adapter-odata-v4 Show documentation
OData V4 adapter for CDS Services Java
/**************************************************************************
* (C) 2019-2024 SAP SE or an SAP affiliate company. All rights reserved. *
**************************************************************************/
package com.sap.cds.adapter.odata.v4;
import com.sap.cds.adapter.IndexContentProvider;
import com.sap.cds.adapter.IndexContentProviderFactory;
import com.sap.cds.services.runtime.CdsRuntime;
import com.sap.cds.services.runtime.CdsRuntimeAware;
public class ODataV4IndexContentProviderFactory implements IndexContentProviderFactory, CdsRuntimeAware {
private CdsRuntime runtime;
@Override
public void setCdsRuntime(CdsRuntime runtime) {
this.runtime = runtime;
}
@Override
public IndexContentProvider create() {
return new ODataV4IndexContentProvider(runtime);
}
@Override
public boolean isEnabled() {
return runtime.getEnvironment().getCdsProperties().getOdataV4().getEndpoint().isEnabled();
}
}