Class CKShare

  • All Implemented Interfaces:
    CKRecordKeyValueSetting, NSCoding, NSCopying, NSSecureCoding, NSObject

    public class CKShare
    extends CKRecord
    implements NSSecureCoding, NSCopying
    CKShare Like CKRecords, CKShares can store arbitrary key-value pairs. They are modified and fetched in the same manner. A share, its root record, and its root record's children records will only appear in a participant's CKFetchRecordChangesOperation's results after the share has been accepted by that participant. Clients have access to the share (and optionally the root record) before accepting a share, via the CKShareMetadata object. Note that in order to access a root record before accepting a share, you must run a CKFetchShareMetadataOperation requesting the root record. A CKShare will appear in a CKFetchRecordChangesOperation's results set whenever the participant list is updated. For that reason, you shouldn't place heavy key-value pairs in it.
    • Constructor Detail

      • CKShare

        protected CKShare​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static CKShare alloc()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • URL

        public NSURL URL()
        A URL that can be used to invite participants to this share. Only available after share record has been saved to the server. This url is stable, and is tied to the rootRecord. That is, if you share a rootRecord, delete the share, and re-share the same rootRecord via a newly created share, that newly created share's url will be identical to the prior share's url
      • addParticipant

        public void addParticipant​(CKShareParticipant participant)
        If a participant with a matching userIdentity already exists, then that existing participant's properties will be updated; no new participant will be added. In order to modify the list of participants, a share must have publicPermission set to @c CKShareParticipantPermissionNone. That is, you cannot mix-and-match private users and public users in the same share. Only certain participant types may be added via this API
        See Also:
        CKShareParticipantRole
      • initWithRecordType

        public CKShare initWithRecordType​(java.lang.String recordType)
        Description copied from class: CKRecord
        This creates the record in the default zone.
        Overrides:
        initWithRecordType in class CKRecord
      • initWithRootRecord

        public CKShare initWithRootRecord​(CKRecord rootRecord)
        When saving a newly created CKShare, you must save the share and its rootRecord in the same CKModifyRecordsOperation batch.
      • owner

        public CKShareParticipant owner()
        Convenience methods for fetching special users from the participant array
      • participants

        public NSArray<? extends CKShareParticipant> participants()
        All participants on the share that the current user has permissions to see. At the minimum that will include the owner and the current user.
      • publicPermission

        public long publicPermission()
        Defines what permission a user has when not explicitly added to the share. Shares with @c publicPermission more permissive than @c CKShareParticipantPermissionNone can be joined by any user with access to the share's shareURL. By default, public permission is @c CKShareParticipantPermissionNone. Changing the public permission to @c CKShareParticipantPermissionReadOnly or @c CKShareParticipantPermissionReadWrite will result in all pending participants being removed. Already-accepted participants will remain on the share. Changing the public permission to @c CKShareParticipantPermissionNone will result in all participants being removed from the share. You may subsequently choose to call @c addParticipant: before saving the share, those participants will be added to the share.
      • setPublicPermission

        public void setPublicPermission​(long value)
        Defines what permission a user has when not explicitly added to the share. Shares with @c publicPermission more permissive than @c CKShareParticipantPermissionNone can be joined by any user with access to the share's shareURL. By default, public permission is @c CKShareParticipantPermissionNone. Changing the public permission to @c CKShareParticipantPermissionReadOnly or @c CKShareParticipantPermissionReadWrite will result in all pending participants being removed. Already-accepted participants will remain on the share. Changing the public permission to @c CKShareParticipantPermissionNone will result in all participants being removed from the share. You may subsequently choose to call @c addParticipant: before saving the share, those participants will be added to the share.
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
        Overrides:
        _supportsSecureCoding in class CKRecord