Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.ejb.versioncontrol.workspace
Class WorkspaceNameCreator  view WorkspaceNameCreator download WorkspaceNameCreator.java

java.lang.Object
  extended bycom.flexstor.ejb.versioncontrol.workspace.WorkspaceNameCreator

public class WorkspaceNameCreator
extends java.lang.Object

A utility class that creates a String representing a unique Workspace name in the database. The uniqueness of the name is not guarantee beyond a short amount of time as some other process might use it as well. If two processes call this class at the same time, there is a likelyhood that they will get the same Workspace name. The name is based on the original name passed to create the workspace plus a four digit number attached at the end.


Field Summary
(package private)  com.flexstor.ejb.PersistSessionBean bean
           
 
Constructor Summary
WorkspaceNameCreator(com.flexstor.ejb.PersistSessionBean bean)
           
 
Method Summary
 java.lang.String getUniqueName(com.flexstor.common.data.edit.EditData editData)
          Get a unique name for a Workspace based on the name already defined in the EditData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bean

com.flexstor.ejb.PersistSessionBean bean
Constructor Detail

WorkspaceNameCreator

public WorkspaceNameCreator(com.flexstor.ejb.PersistSessionBean bean)
Method Detail

getUniqueName

public java.lang.String getUniqueName(com.flexstor.common.data.edit.EditData editData)
                               throws com.flexstor.common.exceptions.ejb.EjbException
Get a unique name for a Workspace based on the name already defined in the EditData object. The new name will be the same as the original name plus a five digit number appended at the end. This method will check the Workspace application to make sure the name returned is not already in use. This method doesn't guarantee that the name will remain unique for a long period of time as some other process might use it to create a Workspace.