Package org.apache.jetspeed.capabilities

Examples of org.apache.jetspeed.capabilities.Capability


  /*
     * @see org.apache.jetspeed.capabilities.Capabilities#createCapability(String)
     */
  public Capability createCapability(String capabilityName)   throws ClassNotFoundException
      {
    Capability capability = null;
    if (capabilityName != null)
    {
      //try to find it in space
      capability = this.getCapability(capabilityName);
      if (capability != null)
        return capability;
    }
        try
        {
          capability = (Capability) beanFactory.getBean(
                    this.capabilityBeanName, Capability.class);
          capability.setName(capabilityName);
            return capability;
        } catch (Exception e)
        {
            log.error("Failed to create capability instance for " + this.capabilityBeanName
                    + " error : " + e.getLocalizedMessage());
View Full Code Here


  /*
     * @see org.apache.jetspeed.capabilities.Capabilities#createCapability(String)
     */
  public Capability createCapability(String capabilityName)   throws ClassNotFoundException
      {
    Capability capability = null;
    if (capabilityName != null)
    {
      //try to find it in space
      capability = this.getCapability(capabilityName);
      if (capability != null)
        return capability;
    }
        try
        {
          capability = (Capability) beanFactory.getBean(
                    this.capabilityBeanName, Capability.class);
          capability.setName(capabilityName);
            return capability;
        } catch (Exception e)
        {
            log.error("Failed to create capability instance for " + this.capabilityBeanName
                    + " error : " + e.getLocalizedMessage());
View Full Code Here

        {
          JSCapability _c = (JSCapability)_it.next();
// create a new Capability
          try
          {
            Capability capability = caps.createCapability(_c.getName());
          /** THE KEY_OVERWRITE_EXISTING test is not required for capabilites, since they carry no other information than the name
           *  Used here for consistency, though
           */          
            if ((this.getSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING)) || (capability.getCapabilityId() == 0))
            {
              caps.storeCapability(capability);
            }
            this.capabilityMap.put(_c.getName(), capability);
          }
View Full Code Here

                      if ((list != null) && (list.size()>0))
                      {
                          int added = 0;
                          while (_it1.hasNext())
                          {
                            Capability _ct = caps.createCapability((String)_it1.next());
                            if (_ct != null)
                              mediaType.addCapability(_ct);
                            added++;
                          }
                      }
View Full Code Here

                      if ((list != null) && (list.size()>0))
                      {
                          int added = 0;
                          while (_it1.hasNext())
                          {
                            Capability _ct = caps.createCapability((String)_it1.next());
                            if (_ct != null)
                              client.getCapabilities().add(_ct);
                            added++;
                          }
                      }
View Full Code Here

        while (list.hasNext())
        {
            try
            {
                Capability _cp = (Capability) list.next();
                JSCapability _jsC = new JSCapability();
                _jsC.setName(_cp.getName());
                this.capabilityMap.put(_jsC.getName(), _jsC);
                this.capabilityMapInt.put(new Integer(_cp.getCapabilityId()), _jsC);
                ((JSSeedData)getSnapshot()).getCapabilities().add(_jsC);
            } catch (Exception e)
            {
                throw new SerializerException(
                        SerializerException.CREATE_SERIALIZED_OBJECT_FAILED
View Full Code Here

            // find the capabilities
            Iterator _itC = c.getCapabilities().iterator();
            while (_itC.hasNext())
            {
                Capability _c = (Capability) _itC.next();
                JSCapability _ct = (JSCapability) capabilityMap.get(_c
                        .getName());
                if (_ct != null) jsC.getCapabilities().add(_ct);
            }

            return jsC;
View Full Code Here

                }
                // find the capabilities
                Iterator _itC = _mt.getCapabilities().iterator();
                while (_itC.hasNext())
                {
                    Capability _c = (Capability) _itC.next();
                    JSCapability _ct = (JSCapability) capabilityMap.get(_c
                            .getName());
                    if (_ct != null) _jsM.getCapabilities().add(_ct);
                }
                this.mediaMap.put(_jsM.getName(), _jsM);
                ((JSSeedData)getSnapshot()).getMediaTypes().add(_jsM);
View Full Code Here

        {
          JSCapability _c = (JSCapability)_it.next();
// create a new Capability
          try
          {
            Capability capability = caps.createCapability(_c.getName());
          /** THE KEY_OVERWRITE_EXISTING test is not required for capabilites, since they carry no other information than the name
           *  Used here for consistency, though
           */          
            if ((this.getSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING)) || (capability.getCapabilityId() == 0))
            {
              caps.storeCapability(capability);
            }
            this.capabilityMap.put(_c.getName(), capability);
          }
View Full Code Here

                      if ((list != null) && (list.size()>0))
                      {
                          int added = 0;
                          while (_it1.hasNext())
                          {
                            Capability _ct = caps.createCapability((String)_it1.next());
                            if (_ct != null)
                              mediaType.addCapability(_ct);
                            added++;
                          }
                      }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.capabilities.Capability

Copyright © 2018 www.massapicom. 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.