Class LockWipePolicy

  • All Implemented Interfaces:
    java.io.Serializable

    @Deprecated() 
    public class LockWipePolicy
     implements Serializable
                        

    The class responsible for defining and applying the lock and wipe policies.

    Deprecated in 7.1, replace with 'LockAndWipeService'.

    • Constructor Detail

      • LockWipePolicy

        LockWipePolicy()
        Creates a default lock &wipe policy object with everything disabled and no callbacks specified.
      • LockWipePolicy

        LockWipePolicy(boolean enabled, int lockDays, int wipeDays)
        Creates a lock &wipe policy object with no callbacks specified.
        Parameters:
        enabled - Specifies whether the entire policy is enabled or not.
        lockDays - The number of 24 hour periods that need to elapse without a successful connection to the server in order to lock the application.
        wipeDays - The number of 24 hour periods that need to elapse without a successful * connection to the server in order to wipe the application.
      • LockWipePolicy

        LockWipePolicy(boolean enabled, int lockDays, int wipeDays, LockWipePolicy.LockCallback lockCallback, LockWipePolicy.WipeCallback wipeCallback)
        Creates a lock &wipe policy object.
        Parameters:
        enabled - Specifies whether the entire policy is enabled or not.
        lockDays - The number of 24 hour periods that need to elapse without a successful connection to the server in order to lock the application.
        wipeDays - The number of 24 hour periods that need to elapse without a successful * connection to the server in order to wipe the application.
        lockCallback - A LockCallback object that specifies the action to be performed in the case of a lock condition.
        wipeCallback - A WipeCallback object that specifies the action to be performed * in the case of a wipe condition.
    • Method Detail

      • getEnabled

         boolean getEnabled()

        Enabled accessor.

        Returns:

        Whether or not the Lock and Wipe Policy is enabled.

      • getLockDays

         int getLockDays()

        Lock Days accessor.

        Returns:

        The number of days that are allowed to elapse without authenticating with the sever before the application is locked.

      • getWipeDays

         int getWipeDays()

        Wipe Days accessor.

        Returns:

        The number of days that are allowed to elapse without authenticating with the sever before the application data is wiped.

      • apply

         boolean apply(@NonNull() Date lastConnectionTime)

        Applies the specified lock and wipe policy.

        Parameters:
        lastConnectionTime - A Date object that specifies the last time the application connected to the server.
        Returns:

        Whether or not a lock or wipe condition was met.

      • setLockCallback

        @NonNull() LockWipePolicy setLockCallback(@NonNull() LockWipePolicy.LockCallback lockCallback)

        Sets the lock callback on a lock &wipe policy object.

        Parameters:
        lockCallback - A LockCallback object that specifies the action to be performed in the case of a lock condition.
        Returns:

        a pointer to the object so that calls can be chained.

      • setWipeCallback

        @NonNull() LockWipePolicy setWipeCallback(@NonNull() LockWipePolicy.WipeCallback wipeCallback)

        Sets the wipe callback on a lock &wipe policy object.

        Parameters:
        wipeCallback - A WipeCallback object that specifies the action to be performed * in the case of a wipe condition.
        Returns:

        a pointer to the object so that calls can be chained.