Purges the jsp repository.<p>

@throws Exception if something goes wrong

@see org.opencms.flex.CmsFlexCache#cmsEvent(org.opencms.main.CmsEvent)
502056
public void purgeJspRepository() throws Exception {

        OpenCms.fireCmsEvent(
            new CmsEvent(I_CmsEventListener.EVENT_FLEX_PURGE_JSP_REPOSITORY, new HashMap<String, Object>()));
    }
133618
public void initialize(CmsObject cms) throws CmsRoleViolationException {

        OpenCms.getRoleManager().checkRole(cms, CmsRole.WORKPLACE_MANAGER);
        try {
            // store the Admin cms to index Cms resources
            m_adminCms = OpenCms.initCmsObject(cms);
        } catch (CmsException e) {
            // this should never happen
            LOG.error(e.getLocalizedMessage(), e);
        }
        // make sure the site root is the root site
        m_adminCms.getRequestContext().setSiteRoot("/");

        // create the extraction result cache
        m_extractionResultCache = new CmsExtractionResultCache(
            OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(getDirectory()),
            "/extractCache");
        initializeFieldConfigurations();
        initializeIndexes();
        initOfflineIndexes();

        // register this object as event listener
        OpenCms.addCmsEventListener(
            this,
            new int[] {
                I_CmsEventListener.EVENT_CLEAR_CACHES,
                I_CmsEventListener.EVENT_PUBLISH_PROJECT,
                I_CmsEventListener.EVENT_REBUILD_SEARCHINDEXES});
    }
211596
public void initPage() throws CmsException {

        if ((m_page == null) && (m_cms != null)) {
            String requestUri = m_cms.getRequestContext().getUri();
            // get the container page itself, checking the history first
            CmsResource pageResource = (CmsResource)CmsHistoryResourceHandler.getHistoryResource(m_request);
            if (pageResource == null) {
                pageResource = m_cms.readResource(requestUri);
            }
            m_page = getPage(pageResource);
            m_page = CmsTemplateMapper.get(m_request).transformContainerpageBean(
                m_cms,
                m_page,
                pageResource.getRootPath());

        }
    }
1027201
public void initResource(CmsObject cms) throws CmsException {

        if (m_resource == null) {
            m_resource = cms.readResource(getId(), CmsResourceFilter.IGNORE_EXPIRATION);
            m_releasedAndNotExpired = m_resource.isReleasedAndNotExpired(cms.getRequestContext().getRequestTime());
        } else if (!isInMemoryOnly()) {
            CmsUUID id = m_resource.getStructureId();
            if (id == null) {
                id = getId();
            }
            // the resource object may have a wrong root path, e.g. if it was created before the resource was moved
            if (cms.getRequestContext().getCurrentProject().isOnlineProject()) {
                m_resource = cms.readResource(id, CmsResourceFilter.IGNORE_EXPIRATION);
                m_releasedAndNotExpired = m_resource.isReleasedAndNotExpired(cms.getRequestContext().getRequestTime());
            } else {
                if (!isTemporaryContent()) {
                    m_resource = cms.readResource(getId(), CmsResourceFilter.IGNORE_EXPIRATION);
                }
                m_releasedAndNotExpired = m_resource.isReleasedAndNotExpired(cms.getRequestContext().getRequestTime());
            }
        }
        if (m_settings == null) {
            setSettings(new HashMap<String, String>(getIndividualSettings()));
        }
        // redo on every init call to ensure sitepath is calculated for current site
        m_sitePath = cms.getSitePath(m_resource);
    }
561931
private void deleteResource(final String sitePath) {

        CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                CmsCoreProvider.getVfsService().deleteResource(sitePath, this);

            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(Void result) {

                onAfterDeletion();
            }
        };
        action.execute();
    }
420744
public void remove() throws RemoveException, javax.ejb.EJBException
    {
        try {
            container.removeBean(this);
        } catch (java.rmi.RemoteException e) {
            FFDCFilter.processException(e, CLASS_NAME + ".remove", "132", this);
            throw new EJBException(e);
        }
    }
904312
public void forceDeleteModule(String moduleName) throws Exception {

        OpenCms.getModuleManager().deleteModule(
            m_cms,
            moduleName,
            true,
            new CmsShellReport(m_cms.getRequestContext().getLocale()));
    }
468826
public void deleteUser(CmsRequestContext context, CmsUUID userId) throws CmsException {

        CmsUser user = readUser(context, userId);
        deleteUser(context, user, null);
    }
306695
public void initialize(CmsObject cms) throws CmsException {

        CmsUUID id = m_entry.getId();
        CmsResource resource = cms.readResource(id, CmsResourceFilter.IGNORE_EXPIRATION);
        m_resource = resource;
        CmsResource defaultFile = resource;
        if (resource.isFolder()) {
            defaultFile = cms.readDefaultFile(resource, CmsResourceFilter.IGNORE_EXPIRATION);
        }
        CmsLocaleGroup localeGroup = cms.getLocaleGroupService().readLocaleGroup(defaultFile);
        CmsResource primary = localeGroup.getPrimaryResource();
        CmsProperty noTranslationProp = cms.readPropertyObject(
            primary,
            CmsPropertyDefinition.PROPERTY_LOCALE_NOTRANSLATION,
            false);
        m_noTranslation = noTranslationProp.getValue();
        CmsUUID defaultFileId = (defaultFile != null) ? defaultFile.getStructureId() : null;
        m_isCopyable = (defaultFile != null) && CmsResourceTypeXmlContainerPage.isContainerPage(defaultFile);
        Collection<CmsResource> resourcesForTargetLocale = localeGroup.getResourcesForLocale(m_otherLocale);
        if (!resourcesForTargetLocale.isEmpty()) {
            m_linkedResource = resourcesForTargetLocale.iterator().next();
            if (primary.getStructureId().equals(m_resource.getStructureId())
                || primary.getStructureId().equals(defaultFileId)
                || primary.getStructureId().equals(m_linkedResource.getStructureId())) {
                m_isDirectLink = true;
            }
        }
    }
368323
public void deleteRelationsFromResource(String resourceName, CmsRelationFilter filter) throws CmsException {

        CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL);
        m_securityManager.deleteRelationsForResource(m_context, resource, filter);
    }
398116
void submit() {

        int action = -1;

        if (isModeAll()) {
            action = CmsFlexCache.CLEAR_ONLINE_ALL;
        } else {
            action = CmsFlexCache.CLEAR_ONLINE_ENTRIES;
        }

        OpenCms.fireCmsEvent(
            new CmsEvent(
                I_CmsEventListener.EVENT_FLEX_CACHE_CLEAR,
                Collections.<String, Object> singletonMap(CmsFlexCache.CACHE_ACTION, new Integer(action))));
    }
879992
private void removeOldValues() throws CmsException {

        Locale locale = getLocale();
        I_CmsXmlContentValue value = m_document.getValue(N_DETAIL_PAGE, locale);
        do {
            value = m_document.getValue(N_DETAIL_PAGE, locale);
            if (value != null) {
                m_document.removeValue(value.getPath(), locale, 0);
            }
        } while (value != null);
    }
767206
protected void clearCaches(CmsEvent event) {

        // synchronization of this method is not required as the individual maps are all synchronized maps anyway,
        // and setExportnames() is doing it's own synchronization

        // flush all caches
        m_cacheOnlineLinks.clear();
        m_cacheExportUris.clear();
        m_cacheSecureLinks.clear();
        m_cacheExportLinks.clear();
        m_exportnameResources = null;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLUSHED_CACHES_1, new Integer(event.getType())));
        }
    }
927764
protected void init() throws JspException {

        // initialize OpenCms access objects
        m_controller = CmsFlexController.getController(pageContext.getRequest());
        m_cms = m_controller.getCmsObject();

        try {
            // get the resource name from the selected container
            m_element = OpenCms.getADEManager().getCurrentElement(pageContext.getRequest());
            m_element.initResource(m_cms);
            if (m_cms.getRequestContext().getCurrentProject().isOnlineProject()
                && !m_element.isReleasedAndNotExpired()) {
                throw new CmsException(
                    Messages.get().container(
                        Messages.ERR_RESOURCE_IS_NOT_RELEASE_OR_EXPIRED_1,
                        m_element.getResource().getRootPath()));
            }
            if (m_locale == null) {
                // no locale set, use locale from users request context
                m_locale = m_cms.getRequestContext().getLocale();
            }

            // load content and store it
            CmsJspContentAccessBean bean;
            if ((m_element.isInMemoryOnly() || m_element.isTemporaryContent())
                && (m_element.getResource() instanceof CmsFile)) {
                I_CmsXmlDocument xmlContent = CmsXmlContentFactory.unmarshal(
                    m_cms,
                    m_element.getResource(),
                    pageContext.getRequest());
                bean = new CmsJspContentAccessBean(m_cms, m_locale, xmlContent);
            } else {
                bean = new CmsJspContentAccessBean(m_cms, m_locale, m_element.getResource());
            }
            storeAttribute(getVar(), bean);

            if (m_value != null) {
                // if the optional "val" parameter has been set, store the value map of the content in the page context scope
                storeAttribute(getVal(), bean.getValue());
            }

            if (m_rdfa != null) {
                // if the optional "rdfa" parameter has been set, store the rdfa map of the content in the page context scope
                storeAttribute(getRdfa(), bean.getRdfa());
            }

        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
            m_controller.setThrowable(e, m_cms.getRequestContext().getUri());
            throw new JspException(e);
        }
    }
709477
public void deleteDescriptorIfNecessary() throws CmsException {

        if (m_removeDescriptorOnCancel && (m_desc != null)) {
            m_cms.deleteResource(m_desc, CmsResourceDeleteMode.valueOf(2));
        }

    }
1371318
public void rebuildIndex(String index) throws Exception {

        OpenCms.getSearchManager().rebuildIndex(index, new CmsShellReport(m_cms.getRequestContext().getLocale()));
    }
256957
protected void performRestoreOperation() throws CmsException {

        CmsUUID structureId = new CmsUUID(getSelectedItem().get(LIST_COLUMN_STRUCTURE_ID).toString());
        int version = Integer.parseInt(getSelectedItems().get(0).getId());
        if (version == CmsHistoryResourceHandler.PROJECT_OFFLINE_VERSION) {
            // it is not possible to restore the offline version
            return;
        }
        CmsResource res = getCms().readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION);
        checkLock(getCms().getSitePath(res));
        getCms().restoreResourceVersion(res.getStructureId(), version);
    }