Skip to content

Commit

Permalink
Started with eclipse-hawkbit#100 by means of splitting the management…
Browse files Browse the repository at this point in the history
… services into API

and Jpa implementation.

Signed-off-by: Kai Zimmermann <[email protected]>
  • Loading branch information
kaizimmerm committed May 13, 2016
1 parent 02e2608 commit 6654d71
Show file tree
Hide file tree
Showing 135 changed files with 4,491 additions and 3,835 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import java.util.Map;

import org.eclipse.hawkbit.aspects.ExceptionMappingAspectHandler;
import org.eclipse.hawkbit.repository.SystemManagement;
import org.eclipse.hawkbit.repository.TenantConfigurationManagement;
import org.eclipse.hawkbit.repository.jpa.SystemManagement;
import org.eclipse.hawkbit.repository.model.helper.AfterTransactionCommitExecutorHolder;
import org.eclipse.hawkbit.repository.model.helper.CacheManagerHolder;
import org.eclipse.hawkbit.repository.model.helper.SecurityTokenGeneratorHolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.eclipse.hawkbit.eventbus.event.TargetDeletedEvent;
import org.eclipse.hawkbit.eventbus.event.TargetInfoUpdateEvent;
import org.eclipse.hawkbit.executor.AfterTransactionCommitExecutor;
import org.eclipse.hawkbit.repository.TargetRepository;
import org.eclipse.hawkbit.repository.jpa.TargetRepository;
import org.eclipse.hawkbit.repository.model.Target;
import org.eclipse.hawkbit.repository.model.TargetInfo;
import org.eclipse.hawkbit.repository.model.TenantAwareBaseEntity;
Expand Down Expand Up @@ -66,7 +66,7 @@ public class EntityChangeEventListener {
* in case exception happens in the
* {@link ProceedingJoinPoint#proceed()}
*/
@Around("execution(* org.eclipse.hawkbit.repository.TargetInfoRepository.save(..))")
@Around("execution(* org.eclipse.hawkbit.repository.jpa.TargetInfoRepository.save(..))")
// Exception squid:S00112 - Is aspectJ proxy
@SuppressWarnings({ "squid:S00112" })
public Object targetCreated(final ProceedingJoinPoint joinpoint) throws Throwable {
Expand All @@ -93,7 +93,7 @@ public Object targetCreated(final ProceedingJoinPoint joinpoint) throws Throwabl
* in case exception happens in the
* {@link ProceedingJoinPoint#proceed()}
*/
@Around("execution(* org.eclipse.hawkbit.repository.TargetRepository.deleteByIdIn(..))")
@Around("execution(* org.eclipse.hawkbit.repository.jpa.TargetRepository.deleteByIdIn(..))")
// Exception squid:S00112 - Is aspectJ proxy
@SuppressWarnings({ "squid:S00112" })
public Object targetDeletedById(final ProceedingJoinPoint joinpoint) throws Throwable {
Expand All @@ -115,8 +115,8 @@ public Object targetDeletedById(final ProceedingJoinPoint joinpoint) throws Thro
* in case exception happens in the
* {@link ProceedingJoinPoint#proceed()}
*/
@Around("execution(* org.eclipse.hawkbit.repository.TargetRepository.delete(..))")
// Exception squid:S00112 - Is aspectJ proxy
@Around("execution(* org.eclipse.hawkbit.repository.jpa.TargetRepository.delete(..))")
// Exception squid:S00112 - Is aspectJ proxy
@SuppressWarnings({ "squid:S00112", "unchecked" })
public Object targetDeleted(final ProceedingJoinPoint joinpoint) throws Throwable {
final String currentTenant = tenantAware.getCurrentTenant();
Expand Down Expand Up @@ -146,7 +146,7 @@ private void notifyTargetDeleted(final String tenant, final Long targetId) {
afterCommit.afterCommit(() -> eventBus.post(new TargetDeletedEvent(tenant, targetId)));
}

private boolean isTargetInfoNew(final Object targetInfo) {
private static boolean isTargetInfoNew(final Object targetInfo) {
return ((TargetInfo) targetInfo).isNew();
}

Expand Down
Loading

0 comments on commit 6654d71

Please sign in to comment.