Class Job

    • Field Detail

      • SHORT_DESCR_LENGTH

        public static int SHORT_DESCR_LENGTH
        The max description length for "short" or summary descriptions
    • Constructor Detail

      • Job

        public Job​(IServer server,
                   java.util.Map<java.lang.String,​java.lang.Object> map)
      • Job

        public Job​(IServer server,
                   java.util.Map<java.lang.String,​java.lang.Object> map,
                   boolean longDescriptions)
    • Method Detail

      • newJob

        public static Job newJob​(IServer server,
                                 java.util.Map<java.lang.String,​java.lang.Object> map)
        Simple factory method for creating a new Job class.
        Parameters:
        server - non-null IServer to be associated with this job.
        map - non-null fields map for the job to be created.
        Returns:
        new Job object
      • updateOnServer

        @Deprecated
        public java.lang.String updateOnServer()
                                        throws ConnectionException,
                                               RequestException,
                                               AccessException
        Deprecated.
        use update() instead.
        Description copied from interface: IJob
        Update the underlying Perforce job associated with this object in the Perforce server.

        Basically a convenience method for IServer.updateJob(job).

        Specified by:
        updateOnServer in interface IJob
        Returns:
        possibly-null Perforce server-generated status resulting from operation.
        Throws:
        ConnectionException - if the Perforce server is unreachable or is not connected.
        RequestException - if the Perforce server encounters an error during its processing of the request
        AccessException - if the Perforce server denies access to the caller
      • update

        public void update()
                    throws ConnectionException,
                           RequestException,
                           AccessException
        Description copied from interface: IServerResource
        Update the Perforce server object associated with the underlying P4Java object, if possible. The semantics of server updates are generally object-specific and will be spelled out for each participating object.

        The results of calling this method on objects whose canUpdate method returns false are undefined (but will generally result in a UnimplementedError being thrown).

        Specified by:
        update in interface IServerResource
        Overrides:
        update in class ServerResource
        Throws:
        ConnectionException - if the Perforce server is unreachable or is not connected.
        RequestException - if the Perforce server encounters an error during its processing of the request
        AccessException - if the Perforce server denies access to the caller
        See Also:
        IServerResource.update()
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface IJob
      • getId

        public java.lang.String getId()
        get job name
        Specified by:
        getId in interface IJob
        Returns:
        id
      • setId

        public void setId​(java.lang.String id)
        Set job name
        Specified by:
        setId in interface IJob
        Parameters:
        id - job name
      • setDescription

        public void setDescription​(java.lang.String description)
        Specified by:
        setDescription in interface IJob
      • getJobIdString

        protected java.lang.String getJobIdString​(java.util.Map<java.lang.String,​java.lang.Object> map)
      • getDescriptionString

        protected java.lang.String getDescriptionString​(java.util.Map<java.lang.String,​java.lang.Object> map,
                                                        boolean longDescriptions)