protected void checkType( final String key, final String type, final boolean setIt ) {
Map localTypesMap = getTypesMap();
String curType = (String) localTypesMap.get( key );
if ( curType != null ) {
if ( !curType.equals( type ) ) {
throw new RepositoryException( Messages.getInstance().getErrorString(
"RTREPO.ERROR_0001_INVALIDTYPE", curType, type ) ); //$NON-NLS-1$
}
}
if ( setIt ) {
localTypesMap.put( key, type );