public boolean isSecureLink(CmsObject cms, String vfsName, String siteRoot, boolean fromSecure) {

        if (siteRoot == null) {
            return isSecureLink(cms, vfsName, fromSecure);
        }

        // the site root of the cms object has to be changed so that the property can be read
        String storedSiteRoot = cms.getRequestContext().getSiteRoot();
        try {
            cms.getRequestContext().setSiteRoot(siteRoot);
            return isSecureLink(cms, vfsName, fromSecure);
        } finally {
            cms.getRequestContext().setSiteRoot(storedSiteRoot);
        }
    }
public boolean isSecureLink ( CmsObject cms , String vfsName , String siteRoot , boolean fromSecure ) { if ( siteRoot == null ) { return isSecureLink ( cms , vfsName , fromSecure ) ; } String storedSiteRoot = cms . getRequestContext ( ) . getSiteRoot ( ) ; try { cms . getRequestContext ( ) . setSiteRoot ( siteRoot ) ; return isSecureLink ( cms , vfsName , fromSecure ) ; } finally { cms . getRequestContext ( ) . setSiteRoot ( storedSiteRoot ) ; } }
Returns <code>true</code> if the given VFS resource should be transported through a secure channel.<p>

The secure mode is only checked in the "Online" project.
If the given OpenCms context is currently not in the "Online" project,
<code>false</code> is returned.<p>

The given resource is read from the site root of the provided OpenCms context.<p>

@param cms the current users OpenCms context
@param vfsName the VFS resource name to check
@param siteRoot the site root where the the VFS resource should be read
@param fromSecure <code>true</code> if the link source is delivered secure

@return <code>true</code> if the given VFS resource should be transported through a secure channel

@see CmsStaticExportManager#isSecureLink(CmsObject, String, String)