Package org.wso2.carbon.identity.core.model

Examples of org.wso2.carbon.identity.core.model.RelyingPartyDO


    /**
     * {@inheritDoc}
     */
    protected PPIDValueDO resourceToObject(Resource resource) {
        PPIDValueDO ppid = null;
        RelyingPartyDO rp = null;
        if (resource != null) {
            ppid = new PPIDValueDO();
            rp = new RelyingPartyDO();
            ppid.setHostName(resource.getProperty(IdentityRegistryResources.PROP_HOST_NAME));
            rp.setHostName(resource.getProperty(IdentityRegistryResources.PROP_HOST_NAME));
            ppid.setRelyingParty(rp);
            ppid.setUserId(resource.getProperty(IdentityRegistryResources.PROP_USER_ID));
            ppid.setPpid(addSpecialCharacters(resource
                    .getProperty(IdentityRegistryResources.PROP_PPID)));
        }
View Full Code Here


   * @throws IdentityException
   */
  public void create(RelyingPartyDO rp) throws IdentityException {
    String uuid = null;
    String path = null;
    RelyingPartyDO rpdo = null;
    Resource resource = null;

    if (log.isDebugEnabled()) {
      log.debug("Creating new relying party");
    }
View Full Code Here

   * @param hostName
   * @return
   * @throws IdentityException
   */
  public RelyingPartyDO getRelyingPartyDO(String hostName) throws IdentityException {
    RelyingPartyDO rp = null;

    if (log.isDebugEnabled()) {
      log.debug("Retreiving relying party for host " + hostName);
    }

View Full Code Here

   * @param hostName
   * @throws IdentityException
   */
  public void createPPIDValueForRP(PPIDValueDO ppidValue, String hostName)
      throws IdentityException {
    RelyingPartyDO rp = null;
    String path = null;
    Resource resource = null;

    if (log.isDebugEnabled()) {
      log.debug("Creating PPID for user relying party");
    }

    try {
      rp = getFirstObjectWithPropertyValue(IdentityRegistryResources.RELYING_PARTY,
          IdentityRegistryResources.PROP_HOST_NAME, hostName);
      if (rp == null) {
        if (log.isDebugEnabled()) {
          log.debug("Rrelying party already exists");
        }
        return;
      }
      path = IdentityRegistryResources.RELYING_PARTY + rp.getUuid() + "/"
          + ppidValue.getUserId() + "/" + ppidValue.getPpid();
      resource = registry.get(path);
      registry.put(path, resource);
    } catch (RegistryException e) {
      log.error("Error while creating PPID for user relying party", e);
View Full Code Here

   * @throws IdentityException
   */
  public PPIDValueDO[] getIssuedPPIDvaluesForUser(String userId, String hostName)
      throws IdentityException {
    PPIDValueDO[] vals = new PPIDValueDO[0];
    RelyingPartyDO rp = null;
    List<PPIDValueDO> lst = null;
    String path = null;
    Collection collection = null;
    String[] children = null;

    if (log.isDebugEnabled()) {
      log.debug("Retreiving PPIDs for user " + userId);
    }

    try {
      rp = getFirstObjectWithPropertyValue(IdentityRegistryResources.RELYING_PARTY,
          IdentityRegistryResources.PROP_HOST_NAME, hostName);
      if (rp == null) {
        // TODO
        return vals;
      }
      lst = new ArrayList<PPIDValueDO>();
      path = IdentityRegistryResources.RELYING_PARTY + rp.getUuid() + "/" + userId;
      collection = (Collection) registry.get(path);
      children = collection.getChildren();
      for (String child : children) {
        int index = child.lastIndexOf("/");
        String ppid = child.substring(index);
View Full Code Here

  /**
   * {@inheritDoc}
   */
  protected RelyingPartyDO resourceToObject(Resource resource) {
    RelyingPartyDO rp = null;

    if (resource != null) {
      rp = new RelyingPartyDO();
      String path = resource.getPath();
      int index = path.lastIndexOf("/");
      String uuid = path.substring(index);
      String hostName = resource.getProperty(IdentityRegistryResources.PROP_HOST_NAME);
      String alias = resource.getProperty(IdentityRegistryResources.PROP_ALIAS);
      rp.setUuid(uuid);
      rp.setHostName(hostName);
      rp.setHostName(alias);
    }
    return rp;
  }
View Full Code Here

        }

        public void run() {
            try {
                MessageContext msgCtx = ((Axis2MessageContext) synCtx).getAxis2MessageContext();
                Event<MessageContext> event = new Event(msgCtx);
                subscriptions = subscriptionManager.getMatchingSubscriptions(event);
            } catch (EventException e) {
                handleException("Matching subscriptions fetching error", e);
            }
View Full Code Here

     * @throws EventException event
     */
    private void processGetStatusRequest(MessageContext mc,
                                         ResponseMessageBuilder messageBuilder)
            throws AxisFault, EventException {
        Subscription subscription =
                SubscriptionMessageBuilder.createGetStatusMessage(mc);
        if (log.isDebugEnabled()) {
            log.debug("GetStatus request recived for SynapseSubscription ID : " +
                    subscription.getId());
        }
        subscription = subscriptionManager.getSubscription(subscription.getId());
        if (subscription != null) {
            if (log.isDebugEnabled()) {
                log.debug("Sending GetStatus responce for SynapseSubscription ID : " +
                        subscription.getId());
            }
            //send the responce
            SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE,
                    mc, false);
View Full Code Here

            // Adding static subscriptions
            List<Subscription> staticSubscriptionList =
                    eventSource.getSubscriptionManager().getStaticSubscriptions();
            for (Iterator<Subscription> iterator = staticSubscriptionList.iterator();
                 iterator.hasNext();) {
                Subscription staticSubscription = iterator.next();
                OMElement staticSubElem =
                        fac.createOMElement("subscription", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                staticSubElem.addAttribute(
                        fac.createOMAttribute("id", nullNS, staticSubscription.getId()));
                OMElement filterElem =
                        fac.createOMElement("filter", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                filterElem.addAttribute(fac.createOMAttribute("source", nullNS,
                        (String) staticSubscription.getFilterValue()));
                filterElem.addAttribute(fac.createOMAttribute("dialect", nullNS,
                        (String) staticSubscription.getFilterDialect()));
                staticSubElem.addChild(filterElem);
                OMElement endpointElem =
                        fac.createOMElement("endpoint", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                OMElement addressElem =
                        fac.createOMElement("address", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                addressElem.addAttribute(
                        fac.createOMAttribute("uri", nullNS, staticSubscription.getEndpointUrl()));
                endpointElem.addChild(addressElem);
                staticSubElem.addChild(endpointElem);
                if (staticSubscription.getExpires() != null) {
                    OMElement expiresElem =
                            fac.createOMElement("expires", XMLConfigConstants.SYNAPSE_OMNAMESPACE);
                    fac.createOMText(expiresElem,
                            ConverterUtil.convertToString(staticSubscription.getExpires()));
                    staticSubElem.addChild(expiresElem);
                }
                evenSourceElem.addChild(staticSubElem);
            }
View Full Code Here


    public SynapseSubscription() {
        this.setId(UIDGenerator.generateURNString());
        this.setDeliveryMode(EventingConstants.WSE_DEFAULT_DELIVERY_MODE);
        SubscriptionData subscriptionData = new SubscriptionData();
        subscriptionData.setProperty(SynapseEventingConstants.STATIC_ENTRY, "false");
        this.setSubscriptionData(subscriptionData);
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.identity.core.model.RelyingPartyDO

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.