@InstantiationStrategy(InstantiationStrategy.PER_BATCH)
public final class DefaultResourceTypes extends ExtensionProvider implements BatchExtension, ServerExtension {
+ private static final String TRUE = "true";
+
@Override
public ResourceTypeTree provide() {
return ResourceTypeTree.builder()
.addType(ResourceType.builder(Qualifiers.PROJECT)
- .setProperty("deletable", "true")
- .setProperty("modifiable_history", "true")
- .setProperty("hasRolePolicy", "true")
- .setProperty("updatable_key", "true")
+ .setProperty("deletable", TRUE)
+ .setProperty("modifiable_history", TRUE)
+ .setProperty("hasRolePolicy", TRUE)
+ .setProperty("updatable_key", TRUE)
.build())
.addType(ResourceType.builder(Qualifiers.MODULE)
- .setProperty("updatable_key", "true")
+ .setProperty("updatable_key", TRUE)
.build())
.addType(ResourceType.builder(Qualifiers.DIRECTORY).build())
.addType(ResourceType.builder(Qualifiers.PACKAGE).build())
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
ResourceDto other = (ResourceDto) obj;
if (id == null) {
- if (other.id != null)
+ if (other.id != null) {
return false;
- } else if (!id.equals(other.id))
+ }
+ } else if (!id.equals(other.id)) {
return false;
+ }
return true;
}