/** * @return * @throws Exception */ public String[] getUserStoreDomains() throws Exception { try { List<String> readWriteDomainNames = new ArrayList<String>(); UserStoreInfo[] storesInfo = userAdminStub.getUserRealmInfo().getUserStoresInfo(); for (UserStoreInfo storeInfo : storesInfo) { if (!storeInfo.getReadOnly()) { readWriteDomainNames.add(storeInfo.getDomainName()); } } return readWriteDomainNames.toArray(new String[readWriteDomainNames.size()]); } catch (Exception e) { log.error("Error in retrieving User Store Domain IDs", e); throw new Exception( "Error occurred while retrieving Read-Write User Store Domain IDs for logged-in user's tenant realm"); } }
/** * Utility method to write an element start tag. */ private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); if (writerPrefix != null) { xmlWriter.writeStartElement(namespace, localPart); } else { if (namespace.length() == 0) { prefix = ""; } else if (prefix == null) { prefix = generatePrefix(namespace); } xmlWriter.writeStartElement(prefix, localPart, namespace); xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } }
/** * Util method to write an attribute without the ns prefix */ private void writeAttribute(java.lang.String namespace,java.lang.String attName, java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ if (namespace.equals("")) { xmlWriter.writeAttribute(attName,attValue); } else { registerPrefix(xmlWriter, namespace); xmlWriter.writeAttribute(namespace,attName,attValue); } }
new UserStoreInfo(); object.setBulkImportSupported( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); object.setCaseSensitiveUsername( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); object.setDomainName( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setExternalIdP( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setMaxRoleLimit( org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content)); object.setMaxRoleLimit(java.lang.Integer.MIN_VALUE); object.setMaxUserLimit( org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content)); object.setMaxUserLimit(java.lang.Integer.MIN_VALUE); object.setPasswordRegEx( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setPasswordRegExViolationErrorMsg( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
new UserStoreInfo(); object.setBulkImportSupported( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); object.setDomainName( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setExternalIdP( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setMaxRoleLimit( org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content)); object.setMaxRoleLimit(java.lang.Integer.MIN_VALUE); object.setMaxUserLimit( org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content)); object.setMaxUserLimit(java.lang.Integer.MIN_VALUE); object.setPasswordRegEx( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setPasswordsExternallyManaged( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); object.setReadOnly( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content));
writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://common.mgt.user.carbon.wso2.org/xsd"); if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", namespacePrefix+":UserStoreInfo", xmlWriter); } else { writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", "UserStoreInfo", xmlWriter); writeStartElement(null, namespace, "bulkImportSupported", xmlWriter); } if (localDomainNameTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "domainName", xmlWriter); writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); } if (localExternalIdPTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "externalIdP", xmlWriter); writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); } if (localMaxRoleLimitTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "maxRoleLimit", xmlWriter);
public static UserStoreInfo getUserStoreInfo(String domainName, UserRealmInfo realmInfo) { for (UserStoreInfo info : realmInfo.getUserStoresInfo()) { if (domainName != null && domainName.equalsIgnoreCase(info.getDomainName())) { return info; } } return null; }
xmlWriter.writeEndElement(); }else{ localPrimaryUserStoreInfo.serialize(new javax.xml.namespace.QName("http://common.mgt.user.carbon.wso2.org/xsd","primaryUserStoreInfo"), xmlWriter); for (int i = 0;i < localUserStoresInfo.length;i++){ if (localUserStoresInfo[i] != null){ localUserStoresInfo[i].serialize(new javax.xml.namespace.QName("http://common.mgt.user.carbon.wso2.org/xsd","userStoresInfo"), xmlWriter); } else {
new UserStoreInfo(); object.setBulkImportSupported( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); object.setCaseSensitiveUsername( org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(content)); object.setDomainName( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setExternalIdP( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setMaxRoleLimit( org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content)); object.setMaxRoleLimit(java.lang.Integer.MIN_VALUE); object.setMaxUserLimit( org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content)); object.setMaxUserLimit(java.lang.Integer.MIN_VALUE); object.setPasswordRegEx( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content)); object.setPasswordRegExViolationErrorMsg( org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://common.mgt.user.carbon.wso2.org/xsd"); if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", namespacePrefix+":UserStoreInfo", xmlWriter); } else { writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", "UserStoreInfo", xmlWriter); writeStartElement(null, namespace, "bulkImportSupported", xmlWriter); } if (localCaseSensitiveUsernameTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "caseSensitiveUsername", xmlWriter); } if (localDomainNameTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "domainName", xmlWriter); writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); } if (localExternalIdPTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "externalIdP", xmlWriter); writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
public static UserStoreInfo getUserStoreInfo(String domainName, UserRealmInfo realmInfo) { for (UserStoreInfo info : realmInfo.getUserStoresInfo()) { if (domainName != null && domainName.equalsIgnoreCase(info.getDomainName())) { return info; } } return null; }
xmlWriter.writeEndElement(); }else{ localPrimaryUserStoreInfo.serialize(new javax.xml.namespace.QName("http://common.mgt.user.carbon.wso2.org/xsd","primaryUserStoreInfo"), xmlWriter); for (int i = 0;i < localUserStoresInfo.length;i++){ if (localUserStoresInfo[i] != null){ localUserStoresInfo[i].serialize(new javax.xml.namespace.QName("http://common.mgt.user.carbon.wso2.org/xsd","userStoresInfo"), xmlWriter); } else {
writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://common.mgt.user.carbon.wso2.org/xsd"); if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){ writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", namespacePrefix+":UserStoreInfo", xmlWriter); } else { writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type", "UserStoreInfo", xmlWriter); writeStartElement(null, namespace, "bulkImportSupported", xmlWriter); } if (localCaseSensitiveUsernameTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "caseSensitiveUsername", xmlWriter); } if (localDomainNameTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "domainName", xmlWriter); writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter); } if (localExternalIdPTracker){ namespace = "http://common.mgt.user.carbon.wso2.org/xsd"; writeStartElement(null, namespace, "externalIdP", xmlWriter); writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","1",xmlWriter);
/** * @return * @throws Exception */ public String[] getUserStoreDomains() throws Exception { try { List<String> readWriteDomainNames = new ArrayList<String>(); UserStoreInfo[] storesInfo = userAdminStub.getUserRealmInfo().getUserStoresInfo(); for (UserStoreInfo storeInfo : storesInfo) { if (!storeInfo.getReadOnly()) { readWriteDomainNames.add(storeInfo.getDomainName()); } } return readWriteDomainNames.toArray(new String[readWriteDomainNames.size()]); } catch (Exception e) { log.error("Error in retrieving User Store Domain IDs", e); throw new Exception( "Error occurred while retrieving Read-Write User Store Domain IDs for logged-in user's tenant realm"); } }
public static UserStoreInfo getUserStoreInfo(String domainName, UserRealmInfo realmInfo) { for (UserStoreInfo info : realmInfo.getUserStoresInfo()) { if (domainName != null && domainName.equalsIgnoreCase(info.getDomainName())) { return info; } } return null; }
/** * Utility method to write an element start tag. */ private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); if (writerPrefix != null) { xmlWriter.writeStartElement(namespace, localPart); } else { if (namespace.length() == 0) { prefix = ""; } else if (prefix == null) { prefix = generatePrefix(namespace); } xmlWriter.writeStartElement(prefix, localPart, namespace); xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } }
/** * Util method to write an attribute without the ns prefix */ private void writeAttribute(java.lang.String namespace,java.lang.String attName, java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{ if (namespace.equals("")) { xmlWriter.writeAttribute(attName,attValue); } else { registerPrefix(xmlWriter, namespace); xmlWriter.writeAttribute(namespace,attName,attValue); } }
xmlWriter.writeEndElement(); }else{ localPrimaryUserStoreInfo.serialize(new javax.xml.namespace.QName("http://common.mgt.user.carbon.wso2.org/xsd","primaryUserStoreInfo"), xmlWriter); for (int i = 0;i < localUserStoresInfo.length;i++){ if (localUserStoresInfo[i] != null){ localUserStoresInfo[i].serialize(new javax.xml.namespace.QName("http://common.mgt.user.carbon.wso2.org/xsd","userStoresInfo"), xmlWriter); } else {
/** * @return * @throws Exception */ public String[] getUserStoreDomains() throws Exception { try { List<String> readWriteDomainNames = new ArrayList<String>(); UserStoreInfo[] storesInfo = userAdminStub.getUserRealmInfo().getUserStoresInfo(); for (UserStoreInfo storeInfo : storesInfo) { if (!storeInfo.getReadOnly()) { readWriteDomainNames.add(storeInfo.getDomainName()); } } return readWriteDomainNames.toArray(new String[readWriteDomainNames.size()]); } catch (Exception e) { log.error("Error in retrieving User Store Domain IDs", e); throw new Exception( "Error occurred while retrieving Read-Write User Store Domain IDs for logged-in user's tenant realm"); } }
public static UserStoreInfo getUserStoreInfo(String domainName, UserRealmInfo realmInfo) { for(UserStoreInfo info : realmInfo.getUserStoresInfo()){ if(domainName != null && domainName.equalsIgnoreCase(info.getDomainName())){ return info; } } return null; }