public CmsResource importResource(
        CmsRequestContext context,
        String resourcePath,
        CmsResource resource,
        byte[] content,
        List<CmsProperty> properties,
        boolean importCase)
    throws CmsException {

        CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
        CmsResource newResource = null;
        try {
            checkOfflineProject(dbc);
            newResource = m_driverManager.createResource(dbc, resourcePath, resource, content, properties, importCase);
        } catch (Exception e) {
            dbc.report(
                null,
                Messages.get().container(Messages.ERR_IMPORT_RESOURCE_2, context.getSitePath(resource), resourcePath),
                e);
        } finally {
            dbc.clear();
        }
        return newResource;
    }
public CmsResource importResource ( CmsRequestContext context , String resourcePath , CmsResource resource , byte [ ] content , List < CmsProperty > properties , boolean importCase ) throws CmsException { CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; CmsResource newResource = null ; try { checkOfflineProject ( dbc ) ; newResource = m_driverManager . createResource ( dbc , resourcePath , resource , content , properties , importCase ) ; } catch ( Exception e ) { dbc . report ( null , Messages . get ( ) . container ( Messages . ERR_IMPORT_RESOURCE_2 , context . getSitePath ( resource ) , resourcePath ) , e ) ; } finally { dbc . clear ( ) ; } return newResource ; }
Creates a new resource with the provided content and properties.<p>

The <code>content</code> parameter may be null if the resource id already exists.
If so, the created resource will be made a sibling of the existing resource,
the existing content will remain unchanged.
This is used during file import for import of siblings as the
<code>manifest.xml</code> only contains one binary copy per file.
If the resource id exists but the <code>content</code> is not null,
the created resource will be made a sibling of the existing resource,
and both will share the new content.<p>

@param context the current request context
@param resourcePath the name of the resource to create (full path)
@param resource the new resource to create
@param content the content for the new resource
@param properties the properties for the new resource
@param importCase if <code>true</code>, signals that this operation is done while importing resource,
causing different lock behavior and potential "lost and found" usage

@return the created resource

@throws CmsException if something goes wrong