Class AbstractModifiableLayer

    • Constructor Detail

      • AbstractModifiableLayer

        protected AbstractModifiableLayer​(java.lang.String name)
        Constructs a new ModifiableLayer.
        Parameters:
        name - Layer name
    • Method Detail

      • isDownloadable

        public boolean isDownloadable()
        Description copied from interface: DownloadFromServer
        Determines if the layer is able to download data and implements the DownloadFromServer interface. A layer that implements the DownloadFromServer interface must return true.
        Specified by:
        isDownloadable in interface DownloadFromServer
        Returns:
        true if the layer is able to download data; false, otherwise
      • isUploadable

        public boolean isUploadable()
        Description copied from interface: UploadToServer
        Determines if the layer is able to upload data and implements the UploadToServer interface. A layer that implements the UploadToServer interface must return true.
        Specified by:
        isUploadable in interface UploadToServer
        Returns:
        true if the layer is able to upload data; false, otherwise
      • requiresUploadToServer

        public boolean requiresUploadToServer()
        Description copied from interface: UploadToServer
        Determines if the data managed by this layer needs to be uploaded to the server because it contains modified data.
        Specified by:
        requiresUploadToServer in interface UploadToServer
        Returns:
        true if the data managed by this layer needs to be uploaded to the server because it contains modified data; false, otherwise
      • requiresSaveToFile

        public boolean requiresSaveToFile()
        Description copied from interface: SaveToFile
        Determines if the data managed by this layer needs to be saved to a file. Only replies true if a file is assigned to this layer and if the data managed by this layer has been modified since the last save operation to the file.
        Specified by:
        requiresSaveToFile in interface SaveToFile
        Returns:
        true if the data managed by this layer needs to be saved to a file; false, otherwise
      • isUploadDiscouraged

        public boolean isUploadDiscouraged()
        Description copied from interface: UploadToServer
        Determines if upload of data managed by this layer is discouraged. This feature allows to use "private" data layers.
        Specified by:
        isUploadDiscouraged in interface UploadToServer
        Returns:
        true if upload is discouraged for this layer; false, otherwise
      • isDirty

        public boolean isDirty()
        Determines if this layer is "dirty", i.e. requires save or upload
        Returns:
        if this layer is "dirty"
        Since:
        18287
      • isModified

        public abstract boolean isModified()
        Determines if data managed by this layer has been modified.
        Returns:
        true if data has been modified; false, otherwise
      • lock

        public void lock()
        Description copied from interface: Lockable
        Enables the read-only/locked mode.
        Specified by:
        lock in interface Lockable
      • unlock

        public void unlock()
        Description copied from interface: Lockable
        Disables the read-only/locked mode.
        Specified by:
        unlock in interface Lockable
      • isLocked

        public boolean isLocked()
        Description copied from interface: Lockable
        Determines if this is read-only/locked (thus it cannot be modified).
        Specified by:
        isLocked in interface Lockable
        Returns:
        true if this is read-only/locked
      • autosave

        public boolean autosave​(java.io.File file)
                         throws java.io.IOException
        Perform the autosave action for the layer
        Parameters:
        file - The file to save to
        Returns:
        true if the layer was successfully saved
        Throws:
        java.io.IOException - If there was an IO exception from saving
        Since:
        16548
      • getData

        public Data getData()
        Get the data for the modifiable layer
        Returns:
        The data object
        Since:
        16548