public void copyPageOnly ( CmsResource originalPage , String targetPageRootPath ) throws CmsException , NoCustomReplacementException { if ( ( null == originalPage ) || ! OpenCms . getResourceManager ( ) . getResourceType ( originalPage ) . getTypeName ( ) . equals ( CmsResourceTypeXmlContainerPage . getStaticTypeName ( ) ) ) { throw new CmsException ( new CmsMessageContainer ( Messages . get ( ) , Messages . ERR_PAGECOPY_INVALID_PAGE_0 ) ) ; } m_originalPage = originalPage ; CmsObject rootCms = getRootCms ( ) ; rootCms . copyResource ( originalPage . getRootPath ( ) , targetPageRootPath ) ; CmsResource copiedPage = rootCms . readResource ( targetPageRootPath , CmsResourceFilter . IGNORE_EXPIRATION ) ; m_targetFolder = rootCms . readResource ( CmsResource . getFolderPath ( copiedPage . getRootPath ( ) ) ) ; replaceElements ( copiedPage ) ; attachLocaleGroups ( copiedPage ) ; tryUnlock ( copiedPage ) ; }
Copies the given container page to the provided root path .