----- interface CmisService -----
182744
@Override
	public void deleteObjectOrCancelCheckOut(String repositoryId, String objectId, Boolean allVersions, ExtensionsData extension) {
		objectService.deleteObject(repositoryId, objectId, allVersions, extension);
	}
19586
private static void setServiceEnabled(final XMPPConnection connection,
            final boolean isEnabled) {
        ServiceDiscoveryManager manager = ServiceDiscoveryManager
                .getInstanceFor(connection);

        List<String> namespaces = new ArrayList<>();
        namespaces.addAll(Arrays.asList(NAMESPACE));
        namespaces.add(DataPacketExtension.NAMESPACE);
        if (!IBB_ONLY) {
            namespaces.add(Bytestream.NAMESPACE);
        }

        for (String namespace : namespaces) {
            if (isEnabled) {
                manager.addFeature(namespace);
            } else {
                manager.removeFeature(namespace);
            }
        }
    }
964812
@Override
    public void configurationEvent(ConfigurationEvent event) {
        if (event.getType() == ConfigurationEvent.CM_UPDATED && event.getPid().equals(pid)) {
            processProperties();
            initializeInterceptor();
        }

    }
1332540
protected CmsObjectWrapper getCms(SrvSession session, TreeConnection connection) throws CmsException {

        CmsJlanRepository repository = ((CmsJlanDeviceContext)connection.getContext()).getRepository();
        CmsObjectWrapper result = repository.getCms(session, connection);
        return result;
    }
746471
public void configure(CmsObject cms) {

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_TOOLMANAGER_CREATED_0));
        }
        if (m_roots.getObject(ROOTKEY_DEFAULT) == null) {
            CmsToolRootHandler defToolRoot = new CmsToolRootHandler();
            defToolRoot.setKey(ROOTKEY_DEFAULT);
            defToolRoot.setUri(CmsWorkplace.PATH_WORKPLACE + "admin/");
            defToolRoot.setName("${key." + Messages.GUI_ADMIN_VIEW_ROOT_NAME_0 + "}");
            defToolRoot.setHelpText("${key." + Messages.GUI_ADMIN_VIEW_ROOT_HELP_0 + "}");
            addToolRoot(defToolRoot);
        }
        m_tools.clear();
        m_urls.clear();
        Iterator<CmsToolRootHandler> it = getToolRoots().iterator();
        while (it.hasNext()) {
            CmsToolRootHandler toolRoot = it.next();
            if (!cms.existsResource(toolRoot.getUri())) {
                if (CmsLog.INIT.isInfoEnabled()) {
                    CmsLog.INIT.info(
                        Messages.get().getBundle().key(
                            Messages.INIT_TOOLMANAGER_ROOT_SKIPPED_2,
                            toolRoot.getKey(),
                            toolRoot.getUri()));
                }
                continue;
            }
            try {
                toolRoot.setup(cms, null, toolRoot.getUri());
                configureToolRoot(cms, toolRoot);
                // log info
                if (CmsLog.INIT.isInfoEnabled()) {
                    CmsLog.INIT.info(
                        Messages.get().getBundle().key(Messages.INIT_TOOLMANAGER_SETUP_1, toolRoot.getKey()));
                }
            } catch (CmsException e) {
                // log failure
                if (CmsLog.INIT.isWarnEnabled()) {
                    CmsLog.INIT.warn(
                        Messages.get().getBundle().key(Messages.INIT_TOOLMANAGER_SETUP_ERROR_1, toolRoot.getKey()),
                        e);
                }
            }
        }
    }
1067309
@Activate
    protected void activate(ComponentContext cc) throws Exception {

        RuntimeDelegate.setInstance(new RuntimeDelegateImpl());
        //This is a workaroud to avoid invoking createWoodstoxFactory in org.apache.cxf.staxutils.StaxUtils.createXMLInputFactor
        AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>() {
            @Override
            public Boolean run()
                            throws Exception
            {
                System.setProperty(StaxUtils.ALLOW_INSECURE_PARSER, "1"); // sets the bla property without throwing an exception -> ok
                return Boolean.TRUE;
            }
        });
        ClassLoader orignalClassLoader = THREAD_CONTEXT_ACCESSOR.getContextClassLoader(Thread.currentThread());
        try {
            //Make sure the current ThreadContextClassLoader is not an App classloader
            THREAD_CONTEXT_ACCESSOR.setContextClassLoader(Thread.currentThread(), JaxRsServiceActivator.class.getClassLoader());
            Map<String, Object> properties = new HashMap<String, Object>();
            properties.put("org.apache.cxf.bus.id", "Default Bus");
            Bus defaultBus = LibertyApplicationBusFactory.getInstance().createBus(null, properties);
            LibertyApplicationBusFactory.setDefaultBus(defaultBus);
        } finally {
            THREAD_CONTEXT_ACCESSOR.setContextClassLoader(Thread.currentThread(), orignalClassLoader);
        }

    }
408417
protected static I_CmsPublishServiceAsync getService() {

        if (SERVICE == null) {
            SERVICE = GWT.create(I_CmsPublishService.class);
            String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.publish.CmsPublishService.gwt");
            ((ServiceDefTarget)SERVICE).setServiceEntryPoint(serviceUrl);
        }
        return SERVICE;
    }
700991
protected static I_CmsGalleryServiceAsync getGalleryService() {

        if (m_gallerySvc == null) {
            I_CmsGalleryServiceAsync service = createGalleryService();
            m_gallerySvc = service;
        }
        return m_gallerySvc;
    }
212702
public String invokeService(Long processId, String ownerType,
            Long ownerId, String masterRequestId, String masterRequest,
            Map<String,String> parameters, String responseVarName, Map<String,String> headers) throws Exception {
        return invokeService(processId, ownerType, ownerId, masterRequestId, masterRequest, parameters, responseVarName, 0, null, null, headers);
    }
965091
@SuppressWarnings({ "unchecked", "rawtypes" })
    protected void activate(ComponentContext cc) {
        BundleContext bundleContext = cc.getBundleContext();
        monitorServiceTracker = new ServiceTracker(bundleContext, "com.ibm.websphere.monitor.MonitorManager", new ServiceTrackerCustomizer() {

            @Override
            public Object addingService(ServiceReference serviceReference) {
                init();
                return this;
            }

            @Override
            public void modifiedService(ServiceReference arg0, Object serviceReference) {}

            @Override
            public void removedService(ServiceReference arg0, Object serviceReference) {
                preDestroy();
            }
        });;
        monitorServiceTracker.open();
    }
1295233
public static void handleCmsException(CmsException e) {

        if (e instanceof CmsVfsResourceNotFoundException) {
            throw new CmisObjectNotFoundException(e.getLocalizedMessage(), e);
        } else if (e instanceof CmsSecurityException) {
            throw new CmisUnauthorizedException(e.getLocalizedMessage(), e);
        } else {
            throw new CmisRuntimeException(e.getLocalizedMessage(), e);
        }
    }
844228
@Override
    protected boolean performDialogOperation() throws CmsException {

        // on folder touch or multi resource operation display "please wait" screen, not for simple file copy
        if (!DIALOG_WAIT.equals(getParamAction())) {
            // check if the "please wait" screen has to be shown
            if (isMultiOperation()) {
                // show please wait for every multi resource operation
                return false;
            } else {
                // check if the single resource is a folder
                CmsResource sourceRes = getCms().readResource(getParamResource(), CmsResourceFilter.ALL);
                if (sourceRes.isFolder()) {
                    return false;
                }
            }
        }

        // get the new timestamp for the resource(s) from request parameter
        long timeStamp = 0;
        boolean correctDate = false;
        try {
            if (CmsStringUtil.isNotEmpty(getParamNewtimestamp())) {
                timeStamp = CmsCalendarWidget.getCalendarDate(getMessages(), getParamNewtimestamp(), true);
                correctDate = true;
            }
        } catch (ParseException e) {
            throw new CmsException(Messages.get().container(Messages.ERR_PARSE_TIMESTAMP_1, getParamNewtimestamp()), e);
        }

        // get the flag if the touch is recursive from request parameter
        boolean touchRecursive = Boolean.valueOf(getParamRecursive()).booleanValue();
        // get the flag to the touch the content from request parameter
        boolean touchContent = Boolean.valueOf(getParamContent()).booleanValue();

        // now touch the resource(s)
        Iterator<String> i = getResourceList().iterator();
        while (i.hasNext()) {
            String resName = i.next();
            try {
                // lock resource if autolock is enabled
                checkLock(resName);
                touchSingleResource(getCms(), resName, timeStamp, touchRecursive, correctDate, touchContent);
            } catch (CmsException e) {
                // collect exceptions to create a detailed output
                addMultiOperationException(e);
            }
        }
        checkMultiOperationException(Messages.get(), Messages.ERR_TOUCH_MULTI_0);

        return true;
    }
57846
protected void writeInterfaces(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
        interfacesXml.writeInterfaces(writer, modelNode);
    }
1073932
private void setUpdateTimer(final String subscriptionId, final String serviceContextId, long ms) {
    Date timeToRun = new Date(System.currentTimeMillis() + ms);
    sendUpdatetimer.schedule(new TimerTask() {
      public void run() {
        try {
          updateCharging(subscriptionId, serviceContextId, partialCallDurationCounter);
        }
        catch (Exception e) {
          logger.error("(( $ )) Failure trying to create/send CCR (UPDATE) message. (( $ ))", e);
        }
      }
    }, timeToRun);
  }
419752
public static void start() {

        if (!CmsCoreProvider.get().isKeepAlive()) {
            return;
        }

        if (INSTANCE == null) {
            m_keepRunning = true;
            CmsBroadcastTimer timer = new CmsBroadcastTimer();
            timer.getBroadcast();
            timer.run();
            INSTANCE = timer;
        }
    }
1327353
public void onStartServiceEvent(
			javax.slee.serviceactivity.ServiceStartedEvent event,
			ActivityContextInterface aci) {

		try {
			XDMClientChildSbbLocalObject child = (XDMClientChildSbbLocalObject) this
					.getXDMClientChildSbbChildRelation().create(ChildRelationExt.DEFAULT_CHILD_NAME);
			String[] resourceURIS = new String[] { getDocumentSelector() };
			// String aserted = null;
			// subscribe to changes - before doc is created.
			// assume we are bound to the same localhost.
			// from/to must match
			child.subscribe(user, user, 60, resourceURIS);
		} catch (Exception e) {
			tracer.severe("failed to subscribe changes to doc", e);
		}
	}
93329
public void addInterface(JavaClassModel jcm, JavaClassModel interfaceJCM)
    {
        for (JavaClassModel existingInterface : jcm.getInterfaces())
        {
            if (existingInterface.equals(interfaceJCM))
                return;
        }

        jcm.addInterface(interfaceJCM);
    }