Class PushProps

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
Direct Known Subclasses:
EditorPushProps

public class PushProps extends PropCnr
The Push properties for the application.
Author:
Christopher Mindus
  • Field Details

    • FILE_NAME

      public static final String FILE_NAME
      The file name of the Push Notification properties container: ".iiziPush".
      See Also:
    • ATOM

      public static final Atom ATOM
      The atom for the Push Notification properties container: "$push".
    • TTL

      public static final String TTL
      The default Time-to-Live duration property: "TTL".
      See Also:
    • VAPID_PRIVATE_KEY

      public static final String VAPID_PRIVATE_KEY
      The private key property: "VPrivKey".
      See Also:
    • VAPID_PUBLIC_KEY

      public static final String VAPID_PUBLIC_KEY
      The public key property: "VPubKey".
      See Also:
    • APPLE_APP_ID

      public static final String APPLE_APP_ID
      The Apple App ID property: "appleID".
      See Also:
    • DEV_APNS

      public static final String DEV_APNS
      The Development PKCS#12 APNs identity for push messages using TLS to the Apple push notification server property: "devAPNs".
      See Also:
    • PROD_APNS

      public static final String PROD_APNS
      The Production PKCS#12 APNs identity for push messages using TLS to the Apple push notification server property: "prodAPNs".
      See Also:
    • VAPID_SUBJECT

      public static final String VAPID_SUBJECT
      The VAPID subject property: "VSubject". The sub claim of the VAPID JWT (RFC 8292 section 2.1), a mailto: or https: contact URI the push service may use to reach the operator. Optional.
      See Also:
    • FCM_PROJECT_ID

      public static final String FCM_PROJECT_ID
      The Firebase project ID property: "fcmProject". The {project_id} of the FCM HTTP v1 endpoint https://fcm.googleapis.com/v1/projects/{project_id}/messages:send. Public: it is what the client receives as fc and i from /iizi-push/keys.
      See Also:
    • FCM_SERVICE_ACCOUNT

      public static final String FCM_SERVICE_ACCOUNT
      The Firebase service account property: "fcmServiceAccount". The JSON text of a Google service-account key file (client_email, private_key, token_uri, ...) with the Firebase Cloud Messaging API role, from which the server mints the OAuth 2.0 access token that authorizes each FCM v1 send. SECRET: this file is a credential, exactly as VAPID_PRIVATE_KEY is.
      See Also:
  • Constructor Details

    • PushProps

      public PushProps()
      Creates a PushProps container without name and with a null value.
    • PushProps

      public PushProps(Atom propertyAtom)
      Creates a PushProps container with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
  • Method Details

    • clone

      public PushProps clone()
      Creates a clone out of this property.
      Overrides:
      clone in class PropCnr
      Returns:
      The clone of the PWAProps.
    • getPublicVAPIDKey

      public String getPublicVAPIDKey()
      Gets the VAPID public key.
      Returns:
      A Base64-encoded String containing an ECDSA P-256 public key that the push server will use to authenticate the server. Returns null if undefined.
    • getPrivateVAPIDKey

      public String getPrivateVAPIDKey()
      Gets the VAPID private key.
      Returns:
      A Base64url-encoded String containing the P-256 private scalar, 32 bytes, that signs the VAPID JWT. Returns null if undefined.
    • getVAPIDSubject

      public String getVAPIDSubject()
      Gets the VAPID subject, i.e. the sub claim of the VAPID JWT.
      Returns:
      A mailto: or https: contact URI, or null if undefined.
    • getFCMProjectID

      public String getFCMProjectID()
      Gets the Firebase project ID for FCM HTTP v1 sends.
      Returns:
      The project ID, or null if FCM is not configured for the application.
    • getFCMServiceAccount

      public String getFCMServiceAccount()
      Gets the Firebase service account key file as JSON text.
      Returns:
      The service account JSON, or null if FCM is not configured.
    • verify

      public boolean verify(PropVerification verification)
      Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
      Specified by:
      verify in interface IGProp<GProp<?>[]>
      Overrides:
      verify in class PropCnr
      Parameters:
      verification - The property verification class.
      Returns:
      true if verification should proceed, false if disposed of and verification should not take place.