java.lang.Object
com.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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bean
com.flexstor.ejb.PersistSessionBean bean
WorkspaceNameCreator
public WorkspaceNameCreator(com.flexstor.ejb.PersistSessionBean bean)
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.