Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions

Copyright:
==================================================================== Copyright (c) 2003-2005 CollabNet. All rights reserved. This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at http://subversion.tigris.org/license-1.html. If newer versions of this license are posted there, you may use a newer version instead, at your option. This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history and logs, available at http://subversion.tigris.org/. ====================================================================
Endcopyright:
 
 package org.tigris.subversion.javahl;
 
 import java.util.Date;
class to describe a lock. It is return by the lock operation

Since:
1.2
 
 public class Lock
 {
    
the owner of the lock
 
     private String owner;
    
the path of the locked item
 
     private String path;
    
the token provided during the lock operation
 
     private String token;
    
the comment provided during the lock operation
 
     private String comment;
    
the date when the lock was created
 
     private long creationDate;
    
the date when the lock will expire
 
     private long expirationDate;
    
this constructor should only called from JNI code

Parameters:
owner the owner of the lock
path the path of the locked item
token the lock token
comment the lock comment
creationDate the date when the lock was created
expirationDate the date when the lock will expire
 
     Lock(String ownerString pathString tokenString comment,
          long creationDatelong expirationDate)
     {
         this. = owner;
         this. = path;
         this. = token;
         this. = comment;
         this. = creationDate;
         this. = expirationDate;
     }
    

Returns:
the owner of the lock
 
     public String getOwner()
     {
         return ;
     }

    

Returns:
the path of the locked item
 
     public String getPath()
     {
         return ;
     }

    

Returns:
the token provided during the lock operation
 
     public String getToken()
     {
         return ;
     }

    

Returns:
the comment provided during the lock operation
 
     public String getComment()
     {
        return ;
    }

    

Returns:
the date the lock was created
    public Date getCreationDate()
    {
        if( == 0)
            return null;
        else
            return new Date(/1000);
    }

    

Returns:
the date when the lock will expire
    public Date getExpirationDate()
    {
        if( == 0)
            return null;
        else
            return new Date(/1000);
    }
New to GrepCode? Check out our FAQ X