com.rapidminer.repository.remote
Class RemoteEntry

java.lang.Object
  extended by com.rapidminer.repository.remote.RemoteEntry
All Implemented Interfaces:
Entry
Direct Known Subclasses:
RemoteDataEntry, RemoteFolder

public abstract class RemoteEntry
extends java.lang.Object
implements Entry

Author:
Simon Fischer, Nils Woehler

Method Summary
 void delete()
          Deletes the entry and its contents from the repository.
protected  void extractData(EntryResponse response)
          Extracts the relevant data for this entry from the server's response.
 java.util.List<AccessRights> getAccessRights()
          Note: This method contacts the server and may be slow.
 Folder getContainingFolder()
          Returns the folder containing this entry.
 java.util.Collection<javax.swing.Action> getCustomActions()
          Returns custom actions to be displayed in this entry's popup menu.
 java.lang.String getDescription()
          Returns a human readable description.
 RepositoryLocation getLocation()
          A location, that can be used, e.g. as a parameter in the RepositorySource or which can be used to locate the entry using RepositoryManager#resolve(String).
protected static java.util.logging.Logger getLogger()
           
 java.lang.String getName()
          Returns the name, the last part of the location.
 java.lang.String getOwner()
          Returns the user name of the owner.
 RemoteRepository getRepository()
           
 boolean isReadOnly()
          Returns true if this entry cannot be written to.
 boolean move(Folder newParent)
          Needs to be implemented only for folders in the same repository.
 boolean move(Folder newParent, java.lang.String newName)
          Needs to be implemented only for folders in the same repository.
 boolean rename(java.lang.String newName)
          Changes the name of the entry.
 void setAccessRights(java.util.List<AccessRights> accessRights)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.repository.Entry
getType, willBlock
 

Method Detail

extractData

protected void extractData(EntryResponse response)
Extracts the relevant data for this entry from the server's response. Called from constructor and during refresh.


getContainingFolder

public Folder getContainingFolder()
Description copied from interface: Entry
Returns the folder containing this entry.

Specified by:
getContainingFolder in interface Entry

getDescription

public java.lang.String getDescription()
Description copied from interface: Entry
Returns a human readable description.

Specified by:
getDescription in interface Entry

getName

public java.lang.String getName()
Description copied from interface: Entry
Returns the name, the last part of the location.

Specified by:
getName in interface Entry

getOwner

public java.lang.String getOwner()
Description copied from interface: Entry
Returns the user name of the owner.

Specified by:
getOwner in interface Entry

isReadOnly

public boolean isReadOnly()
Description copied from interface: Entry
Returns true if this entry cannot be written to.

Specified by:
isReadOnly in interface Entry

rename

public boolean rename(java.lang.String newName)
               throws RepositoryException
Description copied from interface: Entry
Changes the name of the entry. The entry stays in the same folder.

Specified by:
rename in interface Entry
Throws:
RepositoryException

getRepository

public final RemoteRepository getRepository()

getLogger

protected static java.util.logging.Logger getLogger()

getLocation

public RepositoryLocation getLocation()
Description copied from interface: Entry
A location, that can be used, e.g. as a parameter in the RepositorySource or which can be used to locate the entry using RepositoryManager#resolve(String).

Specified by:
getLocation in interface Entry

delete

public void delete()
            throws RepositoryException
Description copied from interface: Entry
Deletes the entry and its contents from the repository.

Specified by:
delete in interface Entry
Throws:
RepositoryException

move

public boolean move(Folder newParent)
             throws RepositoryException
Description copied from interface: Entry
Needs to be implemented only for folders in the same repository. Moving between different repositories is implemented by RepositoryManager.move(RepositoryLocation, Folder, com.rapidminer.tools.ProgressListener) using a sequence of copy and delete.

Specified by:
move in interface Entry
Throws:
RepositoryException

move

public boolean move(Folder newParent,
                    java.lang.String newName)
             throws RepositoryException
Description copied from interface: Entry
Needs to be implemented only for folders in the same repository. Moving between different repositories is implemented by RepositoryManager.move(RepositoryLocation, Folder, com.rapidminer.tools.ProgressListener) using a sequence of copy and delete.

Specified by:
move in interface Entry
newName - New name for moved entry. If moved entry shouldn't be renamed: newName=null.
Throws:
RepositoryException

getCustomActions

public java.util.Collection<javax.swing.Action> getCustomActions()
Description copied from interface: Entry
Returns custom actions to be displayed in this entry's popup menu.

Specified by:
getCustomActions in interface Entry

getAccessRights

public java.util.List<AccessRights> getAccessRights()
                                             throws RepositoryException
Note: This method contacts the server and may be slow. Invoke in background.

Throws:
RepositoryException

setAccessRights

public void setAccessRights(java.util.List<AccessRights> accessRights)
                     throws RepositoryException
Throws:
RepositoryException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 by Rapid-I