Examples of NodeService


Examples of com.cxy.redisclient.service.NodeService

    String value = service2.readString(1, 0, "key");
    assertEquals(value, "value");
  }

  public void testDeleteKey() throws IOException {
    NodeService service2 = new NodeService();
    service2.deleteKey(1, 0, "key");
  }
View Full Code Here

Examples of com.cxy.redisclient.service.NodeService

    this.key = key;
  }
 
  @Override
  public long getCount() {
    NodeService service = new NodeService();
    return service.getSize(id, db, key);
  }
View Full Code Here

Examples of org.alfresco.service.cmr.repository.NodeService

    if (!node.hasAspect(QName.createQName(Model.NAMESPACE_SOMECO_CONTENT_MODEL, Model.ASPECT_SC_ENCRYPT))) {
      return true;
    }
   
    // check the active property
    NodeService nodeSvc = Repository.getServiceRegistry(context).getNodeService();
        boolean active = (Boolean)nodeSvc.getProperty(ref, QName.createQName(Model.NAMESPACE_SOMECO_CONTENT_MODEL, Model.PROP_IS_ACTIVE));
       
        return !active;
     }
View Full Code Here

Examples of org.alfresco.service.cmr.repository.NodeService

    // otherwise check the active property
    FacesContext context = FacesContext.getCurrentInstance();
   
    // check the active property
    NodeRef ref = new NodeRef(Repository.getStoreRef(), node.getId());
    NodeService nodeSvc = Repository.getServiceRegistry(context).getNodeService();
        boolean active = (Boolean)nodeSvc.getProperty(ref, QName.createQName(Model.NAMESPACE_SOMECO_CONTENT_MODEL, Model.PROP_IS_ACTIVE));
   
        return active;
     }
View Full Code Here

Examples of org.alfresco.service.cmr.repository.NodeService

    private void setAuthenticatedUser(PortletRequest req, String userName) {

        WebApplicationContext ctx = (WebApplicationContext) getPortletContext().getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
        ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
        TransactionService transactionService = serviceRegistry.getTransactionService();
        NodeService nodeService = serviceRegistry.getNodeService();

        AuthenticationComponent authComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent");
        AuthenticationService authService = (AuthenticationService) ctx.getBean("authenticationService");
        PersonService personService = (PersonService) ctx.getBean("personService");

        // Get a list of the available locales
        ConfigService configServiceService = (ConfigService) ctx.getBean("webClientConfigService");
        LanguagesConfigElement configElement = (LanguagesConfigElement) configServiceService.getConfig("Languages").getConfigElement(
                        LanguagesConfigElement.CONFIG_ELEMENT_ID);

        m_languages = configElement.getLanguages();

        // Set up the user information
        UserTransaction tx = transactionService.getUserTransaction();
        NodeRef homeSpaceRef = null;
        User user;
        try {
            tx.begin();
            // Set the authentication
            authComponent.setCurrentUser(userName);
            user = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));
            homeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName), ContentModel.PROP_HOMEFOLDER);
            if (homeSpaceRef == null) {
                logger.warn("Home Folder is null for user '" + userName + "', using company_home.");
                homeSpaceRef = (NodeRef) nodeService.getRootNode(Repository.getStoreRef());
            }
            user.setHomeSpaceId(homeSpaceRef.getId());
            tx.commit();
        } catch (Throwable ex) {
            logger.error(ex);
View Full Code Here

Examples of org.apache.geronimo.clustering.wadi.NodeService

        joiningPeer.getLocalStateMap();
        modify().returnValue(new HashMap());
        joiningPeer.getName();
        modify().returnValue("joiningPeer");
       
        NodeService nodeService = (NodeService) mock(NodeService.class);

        NetworkConnectorTrackerProxy proxy = (NetworkConnectorTrackerProxy) mock(NetworkConnectorTrackerProxy.class,
            "NetworkConnectorTrackerProxy2");
        trackerProxyFactory.getProxy();
        modify().returnValue(proxy);
View Full Code Here

Examples of org.apache.geronimo.farm.service.NodeService

    public void setDiscoveryListener(DiscoveryListener listener) {
        this.listener.setDiscoveryListener(listener);
    }

    public void registerService(URI serviceUri) throws IOException {
        NodeService service = new NodeService(serviceUri);
        this.registeredServices.put(service.getUriString(), service);
    }
View Full Code Here

Examples of org.apache.geronimo.farm.service.NodeService

        NodeService service = new NodeService(serviceUri);
        this.registeredServices.put(service.getUriString(), service);
    }

    public void unregisterService(URI serviceUri) throws IOException {
        NodeService service = new NodeService(serviceUri);
        this.registeredServices.remove(service.getUriString());
    }
View Full Code Here

Examples of org.apache.geronimo.farm.service.NodeService

            NodeServiceVitals vitals = discoveredServices.get(uriString);

            if (vitals == null) {
                try {
                    vitals = serviceVitalsFactory.createSerivceVitals(new NodeService(uriString));

                    discoveredServices.put(uriString, vitals);

                    fireServiceAddEvent(vitals.getService().getUri());
                } catch (URISyntaxException e) {
View Full Code Here

Examples of org.apache.geronimo.farm.service.NodeService

                });
            }
        }

        public void reportFailed(URI serviceUri) {
            final NodeService service = new NodeService(serviceUri);
            NodeServiceVitals serviceVitals = discoveredServices.get(service.getUriString());
            if (serviceVitals != null && serviceVitals.pronounceDead()) {
                fireServiceRemovedEvent(service.getUri());
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.