Enable push for update target, create/update/delete ds
Renamed constant MAX_TARGET_TABLE_ENTRIES Signed-off-by: Asharani <asharani.murugesh@in.bosch.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository.eventbus.event;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
|
||||
/**
|
||||
* Defines the {@link AbstractBaseEntityEvent} of creating a new {@link DistributionSet}.
|
||||
*
|
||||
*/
|
||||
public class DistributionCreatedEvent extends AbstractBaseEntityEvent<DistributionSet> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @param distributionSet
|
||||
* the distributionSet which has been created
|
||||
*/
|
||||
public DistributionCreatedEvent(final DistributionSet distributionSet) {
|
||||
super(distributionSet);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository.eventbus.event;
|
||||
|
||||
import org.eclipse.hawkbit.eventbus.event.AbstractDistributedEvent;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
|
||||
|
||||
/**
|
||||
* * Defines the {@link AbstractDistributedEvent} for deletion of {@link DistributionSet}.
|
||||
|
||||
*
|
||||
*/
|
||||
public class DistributionDeletedEvent extends AbstractDistributedEvent{
|
||||
private static final long serialVersionUID = -3308850381757843098L;
|
||||
final Long[] distributionSetIDs;
|
||||
/**
|
||||
* @param tenant
|
||||
* the tenant for this event
|
||||
* @param distributionSetId
|
||||
* the ID of the target which has been deleted
|
||||
*/
|
||||
public DistributionDeletedEvent(final String tenant, final Long...distributionIds) {
|
||||
super(-1, tenant);
|
||||
this.distributionSetIDs = distributionIds;
|
||||
}
|
||||
|
||||
public Long[] getDistributionSetIDs() {
|
||||
return distributionSetIDs;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository.eventbus.event;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
|
||||
/**
|
||||
* Defines the {@link AbstractBaseEntityEvent} for update a {@link DistributionSet}.
|
||||
*
|
||||
*/
|
||||
public class DistributionSetUpdateEvent extends AbstractBaseEntityEvent<DistributionSet> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param tag
|
||||
* the tag which is updated
|
||||
*/
|
||||
public DistributionSetUpdateEvent(final DistributionSet ds) {
|
||||
super(ds);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository.eventbus.event;
|
||||
|
||||
import org.eclipse.hawkbit.eventbus.event.AbstractDistributedEvent;
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
|
||||
/**
|
||||
*
|
||||
* Defines the {@link AbstractBaseEntityEvent} of deleting a {@link Target}.
|
||||
*/
|
||||
public class TargetDeletedEvent extends AbstractDistributedEvent {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final long targetId;
|
||||
|
||||
/**
|
||||
* @param tenant
|
||||
* the tenant for this event
|
||||
* @param targetId
|
||||
* the ID of the target which has been deleted
|
||||
*/
|
||||
public TargetDeletedEvent(final String tenant, final long targetId) {
|
||||
super(-1, tenant);
|
||||
this.targetId = targetId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the targetId
|
||||
*/
|
||||
public long getTargetId() {
|
||||
return targetId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository.eventbus.event;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
|
||||
/**
|
||||
* Defines the {@link AbstractBaseEntityEvent} of updating a {@link Target}.
|
||||
*
|
||||
*/
|
||||
public class TargetUpdatedEvent extends AbstractBaseEntityEvent<Target> {
|
||||
|
||||
private static final long serialVersionUID = 5665118668865832477L;
|
||||
|
||||
public TargetUpdatedEvent(Target baseEntity) {
|
||||
super(baseEntity);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user