@@ -15,7 +15,7 @@ import org.eclipse.hawkbit.repository.model.DistributionSetType;
|
||||
* Repository constants.
|
||||
*
|
||||
*/
|
||||
public final class Constants {
|
||||
public final class RepositoryConstants {
|
||||
|
||||
/**
|
||||
* Prefix that the server puts in front of
|
||||
@@ -30,7 +30,7 @@ public final class Constants {
|
||||
*/
|
||||
public static final int DEFAULT_DS_TYPES_IN_TENANT = 2;
|
||||
|
||||
private Constants() {
|
||||
private RepositoryConstants() {
|
||||
// Utility class.
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public interface SystemManagement {
|
||||
/**
|
||||
* Returns {@link TenantMetaData} of given and current tenant. Creates for
|
||||
* new tenants also two {@link SoftwareModuleType} (os and app) and
|
||||
* {@link Constants#DEFAULT_DS_TYPES_IN_TENANT} {@link DistributionSetType}s
|
||||
* {@link RepositoryConstants#DEFAULT_DS_TYPES_IN_TENANT} {@link DistributionSetType}s
|
||||
* (os and os_app).
|
||||
*
|
||||
* DISCLAIMER: this variant is used during initial login (where the tenant
|
||||
|
||||
@@ -601,4 +601,4 @@ public interface TargetManagement {
|
||||
+ SpringEvalExpressions.IS_CONTROLLER)
|
||||
List<Target> updateTargets(@NotNull Collection<Target> targets);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,4 @@ public interface ActionWithStatusCount {
|
||||
*/
|
||||
String getRolloutName();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,4 +39,4 @@ public interface Artifact extends TenantAwareBaseEntity {
|
||||
*/
|
||||
Long getSize();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,4 +46,4 @@ public interface BaseEntity extends Serializable, Identifiable<Long> {
|
||||
*/
|
||||
long getOptLockRevision();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,4 +129,4 @@ public interface DistributionSet extends NamedVersionedEntity {
|
||||
*/
|
||||
boolean isComplete();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,4 +19,4 @@ public interface DistributionSetMetadata extends MetaData {
|
||||
*/
|
||||
DistributionSet getDistributionSet();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ public interface DistributionSetTag extends Tag {
|
||||
*/
|
||||
List<DistributionSet> getAssignedToDistributionSet();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,4 +170,4 @@ public interface DistributionSetType extends NamedEntity {
|
||||
*/
|
||||
void setColour(final String colour);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,4 @@ public interface ExternalArtifact extends Artifact {
|
||||
*/
|
||||
void setUrlSuffix(String urlSuffix);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,4 +36,4 @@ public interface MetaData extends Serializable {
|
||||
*/
|
||||
void setValue(String value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,4 +25,4 @@ public interface NamedVersionedEntity extends NamedEntity {
|
||||
*/
|
||||
void setVersion(String version);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ package org.eclipse.hawkbit.repository.model;
|
||||
* Repository model constants.
|
||||
*
|
||||
*/
|
||||
public final class Constants {
|
||||
public final class RepositoryModelConstants {
|
||||
|
||||
/**
|
||||
* indicating that target action has no force time which is only needed in
|
||||
@@ -20,7 +20,7 @@ public final class Constants {
|
||||
*/
|
||||
public static final Long NO_FORCE_TIME = 0L;
|
||||
|
||||
private Constants() {
|
||||
private RepositoryModelConstants() {
|
||||
// Utility class.
|
||||
}
|
||||
|
||||
@@ -156,4 +156,4 @@ public interface Rollout extends NamedEntity {
|
||||
ERROR_STARTING;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,4 +108,4 @@ public interface SoftwareModule extends NamedVersionedEntity {
|
||||
*/
|
||||
List<DistributionSet> getAssignedTo();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,4 +25,4 @@ public interface SoftwareModuleMetadata extends MetaData {
|
||||
*/
|
||||
void setSoftwareModule(SoftwareModule softwareModule);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,4 +57,4 @@ public interface SoftwareModuleType extends NamedEntity {
|
||||
*/
|
||||
void setColour(final String colour);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,4 @@ public interface Tag extends NamedEntity {
|
||||
*/
|
||||
void setColour(String colour);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,4 +56,4 @@ public interface TargetFilterQuery extends TenantAwareBaseEntity {
|
||||
*/
|
||||
void setQuery(String query);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,4 +68,4 @@ public interface TargetInfo extends Serializable {
|
||||
*/
|
||||
boolean isRequestControllerAttributes();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ public interface TargetTag extends Tag {
|
||||
*/
|
||||
List<Target> getAssignedToTargets();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class TargetWithActionStatus {
|
||||
|
||||
private Target target;
|
||||
|
||||
private Status status = null;
|
||||
private Status status;
|
||||
|
||||
public TargetWithActionStatus(final Target target) {
|
||||
this.target = target;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class TargetWithActionType {
|
||||
if (actionType == ActionType.TIMEFORCED) {
|
||||
return forceTime;
|
||||
}
|
||||
return Constants.NO_FORCE_TIME;
|
||||
return RepositoryModelConstants.NO_FORCE_TIME;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,4 +19,4 @@ public interface TenantAwareBaseEntity extends BaseEntity {
|
||||
*/
|
||||
String getTenant();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,4 @@ public interface TenantConfiguration extends TenantAwareBaseEntity {
|
||||
*/
|
||||
void setValue(String value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,4 +31,4 @@ public interface TenantMetaData extends BaseEntity {
|
||||
*/
|
||||
String getTenant();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import javax.persistence.criteria.CriteriaQuery;
|
||||
import javax.persistence.criteria.Root;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.eclipse.hawkbit.repository.Constants;
|
||||
import org.eclipse.hawkbit.repository.RepositoryConstants;
|
||||
import org.eclipse.hawkbit.repository.ControllerManagement;
|
||||
import org.eclipse.hawkbit.repository.TargetManagement;
|
||||
import org.eclipse.hawkbit.repository.TenantConfigurationManagement;
|
||||
@@ -216,7 +216,7 @@ public class JpaControllerManagement implements ControllerManagement {
|
||||
handleFinishedCancelation(actionStatus, action);
|
||||
break;
|
||||
case RETRIEVED:
|
||||
actionStatus.addMessage(Constants.SERVER_MESSAGE_PREFIX + "Cancellation request retrieved.");
|
||||
actionStatus.addMessage(RepositoryConstants.SERVER_MESSAGE_PREFIX + "Cancellation request retrieved.");
|
||||
break;
|
||||
default:
|
||||
// do nothing
|
||||
@@ -230,7 +230,7 @@ public class JpaControllerManagement implements ControllerManagement {
|
||||
private void handleFinishedCancelation(final ActionStatus actionStatus, final JpaAction action) {
|
||||
// in case of successful cancellation we also report the success at
|
||||
// the canceled action itself.
|
||||
actionStatus.addMessage(Constants.SERVER_MESSAGE_PREFIX + "Cancellation completion is finished sucessfully.");
|
||||
actionStatus.addMessage(RepositoryConstants.SERVER_MESSAGE_PREFIX + "Cancellation completion is finished sucessfully.");
|
||||
DeploymentHelper.successCancellation(action, actionRepository, targetManagement, targetInfoRepository,
|
||||
entityManager);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public class JpaDeploymentManagement implements DeploymentManagement {
|
||||
|
||||
return assignDistributionSetByTargetId((JpaDistributionSet) pset,
|
||||
targets.stream().map(target -> target.getControllerId()).collect(Collectors.toList()),
|
||||
ActionType.FORCED, org.eclipse.hawkbit.repository.model.Constants.NO_FORCE_TIME);
|
||||
ActionType.FORCED, org.eclipse.hawkbit.repository.model.RepositoryModelConstants.NO_FORCE_TIME);
|
||||
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public class JpaDeploymentManagement implements DeploymentManagement {
|
||||
@CacheEvict(value = { "distributionUsageAssigned" }, allEntries = true)
|
||||
public DistributionSetAssignmentResult assignDistributionSet(final Long dsID, final String... targetIDs) {
|
||||
return assignDistributionSet(dsID, ActionType.FORCED,
|
||||
org.eclipse.hawkbit.repository.model.Constants.NO_FORCE_TIME, targetIDs);
|
||||
org.eclipse.hawkbit.repository.model.RepositoryModelConstants.NO_FORCE_TIME, targetIDs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,7 +11,7 @@ package org.eclipse.hawkbit.repository.jpa.cache;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.CacheFieldEntityListener;
|
||||
|
||||
/**
|
||||
* Constants for cache keys used in multiple classes.
|
||||
* RepositoryConstants for cache keys used in multiple classes.
|
||||
*
|
||||
*
|
||||
*
|
||||
|
||||
@@ -842,7 +842,7 @@ public class DeploymentManagementTest extends AbstractJpaIntegrationTest {
|
||||
final DistributionSet ds = testdataFactory.createDistributionSet("a");
|
||||
// assign ds to create an action
|
||||
final DistributionSetAssignmentResult assignDistributionSet = deploymentManagement.assignDistributionSet(
|
||||
ds.getId(), ActionType.SOFT, org.eclipse.hawkbit.repository.model.Constants.NO_FORCE_TIME,
|
||||
ds.getId(), ActionType.SOFT, org.eclipse.hawkbit.repository.model.RepositoryModelConstants.NO_FORCE_TIME,
|
||||
target.getControllerId());
|
||||
final Action action = deploymentManagement.findActionWithDetails(assignDistributionSet.getActions().get(0));
|
||||
// verify preparation
|
||||
@@ -865,7 +865,7 @@ public class DeploymentManagementTest extends AbstractJpaIntegrationTest {
|
||||
final DistributionSet ds = testdataFactory.createDistributionSet("a");
|
||||
// assign ds to create an action
|
||||
final DistributionSetAssignmentResult assignDistributionSet = deploymentManagement.assignDistributionSet(
|
||||
ds.getId(), ActionType.FORCED, org.eclipse.hawkbit.repository.model.Constants.NO_FORCE_TIME,
|
||||
ds.getId(), ActionType.FORCED, org.eclipse.hawkbit.repository.model.RepositoryModelConstants.NO_FORCE_TIME,
|
||||
target.getControllerId());
|
||||
final Action action = deploymentManagement.findActionWithDetails(assignDistributionSet.getActions().get(0));
|
||||
// verify perparation
|
||||
|
||||
@@ -10,7 +10,7 @@ package org.eclipse.hawkbit.repository.util;
|
||||
|
||||
import org.eclipse.hawkbit.ExcludePathAwareShallowETagFilter;
|
||||
import org.eclipse.hawkbit.repository.ArtifactManagement;
|
||||
import org.eclipse.hawkbit.repository.Constants;
|
||||
import org.eclipse.hawkbit.repository.RepositoryConstants;
|
||||
import org.eclipse.hawkbit.repository.ControllerManagement;
|
||||
import org.eclipse.hawkbit.repository.DeploymentManagement;
|
||||
import org.eclipse.hawkbit.repository.DistributionSetManagement;
|
||||
@@ -72,7 +72,7 @@ public abstract class AbstractIntegrationTest implements EnvironmentAware {
|
||||
* {@link TestdataFactory#findOrCreateDefaultTestDsType()} and two
|
||||
* {@link SystemManagement#getTenantMetadata()};
|
||||
*/
|
||||
protected static final int DEFAULT_DS_TYPES = Constants.DEFAULT_DS_TYPES_IN_TENANT + 1;
|
||||
protected static final int DEFAULT_DS_TYPES = RepositoryConstants.DEFAULT_DS_TYPES_IN_TENANT + 1;
|
||||
|
||||
@Autowired
|
||||
protected EntityFactory entityFactory;
|
||||
|
||||
Reference in New Issue
Block a user