@Test public void nullDirectory() { RepositoryElementMetaInterface object = mock( RepositoryElementMetaInterface.class ); when( object.getRepositoryDirectory() ).thenReturn( null ); assertNull( getPathOf( object ) ); }
public static String getPathOf( RepositoryElementMetaInterface object ) { if ( object != null && !object.isDeleted() ) { RepositoryDirectoryInterface directory = object.getRepositoryDirectory(); if ( directory != null ) { String path = directory.getPath(); if ( path != null ) { if ( !path.endsWith( "/" ) ) { path += "/"; } path += object.getName(); return path; } } } return null; }
DialogUtils { public static String getPathOf( RepositoryElementMetaInterface object ) { if ( object != null && !object.isDeleted() ) { RepositoryDirectoryInterface directory = object.getRepositoryDirectory(); if ( directory != null ) { String path = directory.getPath(); if ( path != null ) { if ( !path.endsWith( "/" ) ) { path += "/"; } path += object.getName(); return path; } } } return null; } }
DialogUtils { public static String getPathOf( RepositoryElementMetaInterface object ) { if ( object != null && !object.isDeleted() ) { RepositoryDirectoryInterface directory = object.getRepositoryDirectory(); if ( directory != null ) { String path = directory.getPath(); if ( path != null ) { if ( !path.endsWith( "/" ) ) { path += "/"; } path += object.getName(); return path; } } } return null; }  }
DialogUtils { public static String getPathOf( RepositoryElementMetaInterface object ) { if ( object != null && !object.isDeleted() ) { RepositoryDirectoryInterface directory = object.getRepositoryDirectory(); if ( directory != null ) { String path = directory.getPath(); if ( path != null ) { if ( !path.endsWith( "/" ) ) { path += "/"; } path += object.getName(); return path; } } } return null; }  static String getPathOf( RepositoryElementMetaInterface object ); static boolean objectWithTheSameNameExists( SharedObjectInterface object,
      Collection<? extends SharedObjectInterface> scope ); static String getPath( String parentPath, String path ); }
DialogUtils { public static String getPathOf( RepositoryElementMetaInterface object ) { if ( object != null && !object.isDeleted() ) { RepositoryDirectoryInterface directory = object.getRepositoryDirectory(); if ( directory != null ) { String path = directory.getPath(); if ( path != null ) { if ( !path.endsWith( "/" ) ) { path += "/"; } path += object.getName(); return path; } } } return null; }  static String getPathOf( RepositoryElementMetaInterface object ); static boolean objectWithTheSameNameExists( SharedObjectInterface object,
      Collection<? extends SharedObjectInterface> scope ); static String getPath( String parentPath, String path );  }