intarsys runtime library

de.intarsys.tools.locator
Class RenamedLocator

java.lang.Object
  extended by de.intarsys.tools.locator.DelegatingLocator
      extended by de.intarsys.tools.locator.RenamedLocator
All Implemented Interfaces:
IAdapterSupport, ISynchronizable, ILocator

public class RenamedLocator
extends DelegatingLocator


Constructor Summary
RenamedLocator(ILocator delegate)
           
RenamedLocator(ILocator delegate, String fullName)
           
 
Method Summary
 String getFullName()
          The full physical name of this.
 String getLocalName()
          The local name of the receiver within its parent.
 String getTypedName()
          The qualified local name of the receiver within its parent that includes the type specification for the destination if appropriate.
 void rename(String newName)
          Rename the complete physical name to newName.
 
Methods inherited from class de.intarsys.tools.locator.DelegatingLocator
delete, exists, getAdapter, getChild, getDelegate, getInputStream, getLength, getOutputStream, getParent, getRandomAccess, getReader, getReader, getType, getWriter, getWriter, isDirectory, isOutOfSynch, isReadOnly, listLocators, setReadOnly, synch, toURL
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenamedLocator

public RenamedLocator(ILocator delegate)

RenamedLocator

public RenamedLocator(ILocator delegate,
                      String fullName)
Method Detail

getFullName

public String getFullName()
Description copied from interface: ILocator
The full physical name of this.

This method returns a representation that is proprietary to the underlying physical representation, for example a file name, a SQL statement or so on.

Specified by:
getFullName in interface ILocator
Overrides:
getFullName in class DelegatingLocator
Returns:
The full physical name of the receiver.

getLocalName

public String getLocalName()
Description copied from interface: ILocator
The local name of the receiver within its parent.

Specified by:
getLocalName in interface ILocator
Overrides:
getLocalName in class DelegatingLocator
Returns:
The local name of the receiver within its parent.

getTypedName

public String getTypedName()
Description copied from interface: ILocator
The qualified local name of the receiver within its parent that includes the type specification for the destination if appropriate. This is for example a filename with its correct suffix. Some locator may return the same name as "getLocalName".

Specified by:
getTypedName in interface ILocator
Overrides:
getTypedName in class DelegatingLocator
Returns:
The qualified local name of the receiver within its parent that includes the type specification for the destination if appropriate.

rename

public void rename(String newName)
            throws IOException
Description copied from interface: ILocator
Rename the complete physical name to newName.

Specified by:
rename in interface ILocator
Overrides:
rename in class DelegatingLocator
Parameters:
newName - The new name of the ILocator. The new name is expected to contain both local and type part of the name.
Throws:
IOException

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.