Sfoglia il codice sorgente

add ECTypeCreate annotations

tags/v0.1.6
Jonathan Cobb 4 anni fa
parent
commit
86afcdef98
28 ha cambiato i file con 33 aggiunte e 31 eliminazioni
  1. +1
    -1
      bubble-server/src/main/java/bubble/model/account/Account.java
  2. +2
    -5
      bubble-server/src/main/java/bubble/model/account/AccountPolicy.java
  3. +1
    -1
      bubble-server/src/main/java/bubble/model/account/message/AccountMessage.java
  4. +1
    -1
      bubble-server/src/main/java/bubble/model/app/AppData.java
  5. +1
    -1
      bubble-server/src/main/java/bubble/model/app/AppMatcher.java
  6. +1
    -1
      bubble-server/src/main/java/bubble/model/app/AppRule.java
  7. +1
    -1
      bubble-server/src/main/java/bubble/model/app/AppSite.java
  8. +1
    -1
      bubble-server/src/main/java/bubble/model/app/BubbleApp.java
  9. +1
    -1
      bubble-server/src/main/java/bubble/model/app/RuleDriver.java
  10. +2
    -1
      bubble-server/src/main/java/bubble/model/bill/AccountPayment.java
  11. +1
    -1
      bubble-server/src/main/java/bubble/model/bill/AccountPaymentMethod.java
  12. +1
    -1
      bubble-server/src/main/java/bubble/model/bill/AccountPlan.java
  13. +2
    -1
      bubble-server/src/main/java/bubble/model/bill/Bill.java
  14. +1
    -1
      bubble-server/src/main/java/bubble/model/bill/BubblePlan.java
  15. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/AnsibleRole.java
  16. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/BubbleBackup.java
  17. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/BubbleFootprint.java
  18. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/BubbleNetwork.java
  19. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/BubbleNode.java
  20. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/BubbleNodeKey.java
  21. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/CloudService.java
  22. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/CloudServiceData.java
  23. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/notify/ReceivedNotification.java
  24. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/notify/SentNotification.java
  25. +1
    -1
      bubble-server/src/main/java/bubble/model/device/Device.java
  26. +3
    -0
      bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties
  27. +1
    -1
      bubble-web
  28. +1
    -1
      utils/cobbzilla-wizard

+ 1
- 1
bubble-server/src/main/java/bubble/model/account/Account.java Vedi File

@@ -46,7 +46,7 @@ import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;
import static org.cobbzilla.wizard.model.entityconfig.annotations.ECForeignKeySearchDepth.none;
import static org.cobbzilla.wizard.resources.ResourceUtil.invalidEx;

@ECType(root=true) @ECTypeURIs(listFields={"name", "url", "description", "admin", "suspended"}, isDeleteDefined=false)
@ECType(root=true) @ECTypeCreate @ECTypeURIs(listFields={"name", "url", "description", "admin", "suspended"}, isDeleteDefined=false)
@ECTypeChildren(value={
@ECTypeChild(type=Device.class, backref="account"),
@ECTypeChild(type=BubbleApp.class, backref="account"),


+ 2
- 5
bubble-server/src/main/java/bubble/model/account/AccountPolicy.java Vedi File

@@ -13,10 +13,7 @@ import lombok.experimental.Accessors;
import org.cobbzilla.wizard.model.Identifiable;
import org.cobbzilla.wizard.model.IdentifiableBase;
import org.cobbzilla.wizard.model.entityconfig.EntityFieldType;
import org.cobbzilla.wizard.model.entityconfig.annotations.ECField;
import org.cobbzilla.wizard.model.entityconfig.annotations.ECForeignKey;
import org.cobbzilla.wizard.model.entityconfig.annotations.ECSearchable;
import org.cobbzilla.wizard.model.entityconfig.annotations.ECType;
import org.cobbzilla.wizard.model.entityconfig.annotations.*;
import org.cobbzilla.wizard.validation.ValidationResult;
import org.hibernate.annotations.Type;

@@ -37,7 +34,7 @@ import static org.cobbzilla.util.json.JsonUtil.json;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.*;

@Entity @ECType(root=true)
@Entity @ECType(root=true) @ECTypeCreate(method="DISABLED")
@NoArgsConstructor @Accessors(chain=true)
public class AccountPolicy extends IdentifiableBase implements HasAccount {



+ 1
- 1
bubble-server/src/main/java/bubble/model/account/message/AccountMessage.java Vedi File

@@ -23,7 +23,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@Entity @ECType(root=true)
@Entity @ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECIndexes({
@ECIndex(of={"account", "name", "requestId", "messageType", "action", "target"}),
@ECIndex(of={"account", "name", "messageType", "action", "target"}),


+ 1
- 1
bubble-server/src/main/java/bubble/model/app/AppData.java Vedi File

@@ -25,7 +25,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true, pluralDisplayName="App Data")
@ECType(root=true, pluralDisplayName="App Data") @ECTypeCreate
@ECTypeURIs(baseURI= EP_DATA, listFields={"app", "key", "data", "expiration"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({


+ 1
- 1
bubble-server/src/main/java/bubble/model/app/AppMatcher.java Vedi File

@@ -24,7 +24,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=EP_MATCHERS, listFields={"name", "app", "fqdn", "urlRegex", "rule"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({


+ 1
- 1
bubble-server/src/main/java/bubble/model/app/AppRule.java Vedi File

@@ -27,7 +27,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=EP_RULES, listFields={"name", "app", "driver", "configJson"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECTypeChildren(uriPrefix=EP_RULES+"/{AppRule.name}", value={


+ 1
- 1
bubble-server/src/main/java/bubble/model/app/AppSite.java Vedi File

@@ -16,7 +16,7 @@ import javax.persistence.Entity;
import static bubble.ApiConstants.EP_SITES;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=EP_SITES, listFields={"name", "app", "description", "url"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECTypeChildren(uriPrefix=EP_SITES+"/{AppSite.name}", value={


+ 1
- 1
bubble-server/src/main/java/bubble/model/app/BubbleApp.java Vedi File

@@ -22,7 +22,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=APPS_ENDPOINT, listFields={"name", "url", "description", "account", "template", "enabled"})
@ECTypeChildren(uriPrefix=EP_APPS+"/{BubbleApp.name}", value={
@ECTypeChild(type=AppSite.class, backref="app"),


+ 1
- 1
bubble-server/src/main/java/bubble/model/app/RuleDriver.java Vedi File

@@ -27,7 +27,7 @@ import static org.cobbzilla.util.json.JsonUtil.json;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.util.reflect.ReflectionUtil.instantiate;

@ECType(root=true) @ECTypeURIs(baseURI=DRIVERS_ENDPOINT, listFields={"name", "author", "url"})
@ECType(root=true) @ECTypeCreate @ECTypeURIs(baseURI=DRIVERS_ENDPOINT, listFields={"name", "author", "url"})
@ECTypeChildren(uriPrefix=EP_DRIVERS+"/{RuleDriver.name}", value={
@ECTypeChild(type=AppRule.class, backref="driver"),
@ECTypeChild(type=AppData.class, backref="driver")


+ 2
- 1
bubble-server/src/main/java/bubble/model/bill/AccountPayment.java Vedi File

@@ -18,7 +18,8 @@ import javax.persistence.*;
import static org.cobbzilla.util.daemon.ZillaRuntime.errorString;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.*;

@ECType(root=true) @ECTypeURIs(listFields={"account", "paymentMethod", "amount"})
@ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECTypeURIs(listFields={"account", "paymentMethod", "amount"})
@ECIndexes({
@ECIndex(name="account_payment_uniq_bill_success", unique=true, of={"bill"}, where="status = 'success'")
})


+ 1
- 1
bubble-server/src/main/java/bubble/model/bill/AccountPaymentMethod.java Vedi File

@@ -30,7 +30,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@Entity @ECType(root=true)
@Entity @ECType(root=true) @ECTypeCreate(method="DISABLED")
@NoArgsConstructor @Accessors(chain=true)
@ECIndexes({ @ECIndex(unique=true, of={"paymentMethodType", "paymentInfo"}) })
@Slf4j


+ 1
- 1
bubble-server/src/main/java/bubble/model/bill/AccountPlan.java Vedi File

@@ -22,7 +22,7 @@ import static bubble.model.bill.BillPeriod.BILL_START_END_FORMAT;
import static org.cobbzilla.util.daemon.ZillaRuntime.empty;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECTypeURIs(listFields={"account", "plan", "network", "name"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({


+ 2
- 1
bubble-server/src/main/java/bubble/model/bill/Bill.java Vedi File

@@ -16,7 +16,8 @@ import javax.persistence.*;
import static org.cobbzilla.util.daemon.ZillaRuntime.big;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.*;

@ECType(root=true) @ECTypeURIs(listFields={"name", "status", "type", "quantity", "price", "periodStart"})
@ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECTypeURIs(listFields={"name", "status", "type", "quantity", "price", "periodStart"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({
@ECIndex(unique=true, of={"account", "plan", "type", "periodStart"})


+ 1
- 1
bubble-server/src/main/java/bubble/model/bill/BubblePlan.java Vedi File

@@ -25,7 +25,7 @@ import static org.cobbzilla.util.daemon.ZillaRuntime.die;
import static org.cobbzilla.util.daemon.ZillaRuntime.now;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=EP_PLANS, listFields={"name", "domain", "description", "account", "enabled"})
@ECTypeChildren(uriPrefix=EP_PLANS+"/{BubblePlan.name}", value={
@ECTypeChild(type=BubbleNetwork.class, backref="plan")


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/AnsibleRole.java Vedi File

@@ -24,7 +24,7 @@ import static bubble.cloud.storage.StorageServiceDriver.STORAGE_PREFIX;
import static org.cobbzilla.util.json.JsonUtil.json;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;

@ECType(root=true, name="role")
@ECType(root=true, name="role") @ECTypeCreate
@ECTypeURIs(baseURI=EP_ROLES, listFields={"account", "name", "description"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/BubbleBackup.java Vedi File

@@ -23,7 +23,7 @@ import static org.cobbzilla.util.string.StringUtil.ellipsis;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true, name="backup")
@ECType(root=true, name="backup") @ECTypeCreate(method="DISABLED")
@ECTypeURIs(baseURI=BACKUPS_ENDPOINT, listFields={"network", "label", "path"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({ @ECIndex(unique=true, of={"network", "path"}) })


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/BubbleFootprint.java Vedi File

@@ -29,7 +29,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=EP_FOOTPRINTS, listFields={"name", "description"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/BubbleNetwork.java Vedi File

@@ -34,7 +34,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECTypeURIs(baseURI=EP_NETWORKS, listFields={"name", "domain", "description", "account", "enabled"})
@ECTypeChildren(uriPrefix=EP_NETWORKS+"/{BubbleNetwork.name}", value={
@ECTypeChild(type=BubbleNode.class, backref="network")


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/BubbleNode.java Vedi File

@@ -40,7 +40,7 @@ import static org.cobbzilla.util.string.ValidationRegexes.IP4_MAXLEN;
import static org.cobbzilla.util.string.ValidationRegexes.IP6_MAXLEN;
import static org.cobbzilla.wizard.model.entityconfig.annotations.ECForeignKeySearchDepth.shallow;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECTypeURIs(baseURI=EP_NODES, listFields={"name", "ip4"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({ @ECIndex(unique=true, of={"domain", "network", "host"}) })


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/BubbleNodeKey.java Vedi File

@@ -32,7 +32,7 @@ import static org.cobbzilla.util.security.ShaUtil.sha256_hex;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@Entity @ECType(root=true)
@Entity @ECType(root=true) @ECTypeCreate(method="DISABLED")
@NoArgsConstructor @Accessors(chain=true) @ToString(of={"publicKeyHash"}, callSuper=true)
public class BubbleNodeKey extends IdentifiableBase implements HasAccountNoName {



+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/CloudService.java Vedi File

@@ -44,7 +44,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.*;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=EP_CLOUDS, listFields={"name", "description", "account", "enabled"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECTypeChildren(uriPrefix=EP_CLOUDS+"/{CloudService.name}", value={


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/CloudServiceData.java Vedi File

@@ -24,7 +24,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate
@ECTypeURIs(baseURI=EP_DATA, listFields={"key", "data", "expiration"})
@Entity @NoArgsConstructor @Accessors(chain=true)
@ECIndexes({ @ECIndex(unique=true, of={"cloud", "key"}) })


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/notify/ReceivedNotification.java Vedi File

@@ -14,7 +14,7 @@ import javax.persistence.Enumerated;
import static bubble.ApiConstants.EP_RECEIVED_NOTIFICATIONS;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECTypeURIs(baseURI=EP_RECEIVED_NOTIFICATIONS, listFields={"type"})
@Entity @NoArgsConstructor @Accessors(chain=true)
public class ReceivedNotification extends NotificationBase {


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/notify/SentNotification.java Vedi File

@@ -13,7 +13,7 @@ import javax.persistence.Enumerated;

import static bubble.ApiConstants.EP_SENT_NOTIFICATIONS;

@ECType(root=true)
@ECType(root=true) @ECTypeCreate(method="DISABLED")
@ECTypeURIs(baseURI=EP_SENT_NOTIFICATIONS, listFields={"type"})
@Entity @NoArgsConstructor @Accessors(chain=true)
public class SentNotification extends NotificationBase {


+ 1
- 1
bubble-server/src/main/java/bubble/model/device/Device.java Vedi File

@@ -21,7 +21,7 @@ import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENCRYPTED_STRING;
import static org.cobbzilla.wizard.model.crypto.EncryptedTypes.ENC_PAD;

@Entity @ECType(root=true)
@Entity @ECType(root=true) @ECTypeCreate(method="DISABLED")
@NoArgsConstructor @Accessors(chain=true)
@ECIndexes({
@ECIndex(unique=true, of={"account", "network", "name"}),


+ 3
- 0
bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties Vedi File

@@ -29,6 +29,9 @@ label_menu_logout_icon=fa fa-sign-out-alt
# Model Setup fields
form_title_model_setup=System Objects
field_label_entity_type=Object Type
button_label_add_entity=Add New
button_label_close_add_entity=Cancel
button_label_save_add_entity=Save
button_label_view_entity=View
button_label_close_view_entity=Close
button_label_edit_entity=Edit


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit 22741cc80464c120c2eeeef4290c86a3bbc50506
Subproject commit cf3ca2b45310028ddb05be9a707637d87ca3b5b9

+ 1
- 1
utils/cobbzilla-wizard

@@ -1 +1 @@
Subproject commit 0d30dc4bc12a93e3b3f944c101f89fc995cefe2d
Subproject commit 0f56ce9ff5a4afbf1a1421d0b83c7dc1f818a2b6

Caricamento…
Annulla
Salva