
com.sap.cloud.sdk.cloudplatform.auditlog.ScpCfAuditLogFacade Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of auditlog-scp-cf Show documentation
Show all versions of auditlog-scp-cf Show documentation
Implementation of the Cloud platform abstraction for audit logging
on the SAP Cloud Platform (Cloud Foundry).
The newest version!
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.cloud.sdk.cloudplatform.auditlog;
import javax.annotation.Nonnull;
import com.sap.cloud.sdk.cloudplatform.WithRuntimeDependencies;
import com.sap.cloud.sdk.cloudplatform.auditlog.exception.AuditLogAccessException;
import com.sap.cloud.sdk.cloudplatform.exception.DependencyNotFoundException;
/**
* Audit log facade used with CloudFoundry.
*/
public class ScpCfAuditLogFacade implements AuditLogFacade, WithRuntimeDependencies
{
/**
* {@inheritDoc}
*/
@Nonnull
@Override
public Class extends AuditLog> getAuditLogClass()
{
return ScpCfAuditLog.class;
}
/**
* {@inheritDoc}
*/
@Override
public void assertRuntimeDependenciesExist()
throws DependencyNotFoundException
{
try {
Class.forName("com.sap.xs.audit.client.impl.v2.AuditLogMessageFactoryImpl");
}
catch( final ClassNotFoundException e ) {
throw new DependencyNotFoundException(
"Failed to instantiate "
+ ScpCfAuditLog.class.getSimpleName()
+ ". Please make sure to add the latest version of the following dependencies to your project: "
+ "'com.sap.xs.auditlog:audit-java-client-api', "
+ "'com.sap.xs.auditlog:audit-java-client-impl',"
+ "'com.sap.xs.java:xs-env'. "
+ "Note that these dependencies may not be available in Maven Central. "
+ "In this case, please install the latest version of the "
+ "'Standard Java Client Libraries for XS Advanced'. "
+ "Visit 'https://support.sap.com/' and "
+ "search for software downloads with name 'XS_JAVA'.",
e);
}
}
/**
* {@inheritDoc}
*/
@Nonnull
@Override
public AuditLog getAuditLog()
throws AuditLogAccessException
{
assertRuntimeDependenciesExist();
return new ScpCfAuditLog();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy