Create an extended {@link Identity} identifier
with empty administrative domain.

@return the new extended {@link Identity} instance
@throws TransformerConfigurationException
552373
public static Identity createExtendedIdentity(Document doc) throws MarshalException {
		String idName = DomHelpers.prepareExtendedIdentifier(doc);
		return createIdentity(IdentityType.other, idName, null,
				IfmapStrings.OTHER_TYPE_EXTENDED_IDENTIFIER);
	}
1017813
public FutureData<Limit> createLimit(String identity, String service, Long allowance) {
        if (identity == null || identity.isEmpty()) {
            throw new IllegalArgumentException("An identity is required");
        }
        if (service == null || service.isEmpty()) {
            throw new IllegalArgumentException("A service is required");
        }
        if (allowance < 0) {
            throw new IllegalArgumentException("Allowance must be a positive integer");
        }
        FutureData<Limit> future = new FutureData<>();
        URI uri = newParams().forURL(config.newAPIEndpointURI(IDENTITY + "/" + identity + "/limit"));
        try {
            Request request = config.http()
                    .postJSON(uri, new PageReader(newRequestCallback(future, new Limit(), config)))
                    .setData(new NewLimit(service, allowance));
            performRequest(future, request);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return future;
    }
1262454
private static ExtensionAuthentication getAuthenticationExtension() {
		if (extensionAuth == null) {
			extensionAuth = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAuthentication.class);
		}
		return extensionAuth;
	}
1131505
public String createPolicyRuleForExternalId(ComponentService componentService, ExternalId externalId, String policyName) throws IntegrationException {
        Optional<ComponentVersionView> componentVersionView = componentService.getComponentVersion(externalId);
        if (!componentVersionView.isPresent()) {
            throw new BlackDuckIntegrationException(String.format("The external id (%s) provided could not be found, so no policy can be created for it.", externalId.createExternalId()));
        }

        PolicyRuleExpressionSetBuilder builder = new PolicyRuleExpressionSetBuilder();
        builder.addComponentVersionCondition(PolicyRuleConditionOperatorType.EQ, componentVersionView.get());
        PolicyRuleExpressionSetView expressionSet = builder.createPolicyRuleExpressionSetView();

        PolicyRuleView policyRuleView = new PolicyRuleView();
        policyRuleView.setName(policyName);
        policyRuleView.setEnabled(true);
        policyRuleView.setOverridable(true);
        policyRuleView.setExpression(expressionSet);

        return createPolicyRule(policyRuleView);
    }
11146
public Identity identity() throws IOException {
        final Iterator<String> headers =
            new RqHeaders.Base(this).header(this.header).iterator();
        final Identity user;
        if (headers.hasNext()) {
            user = new CcPlain().decode(
                new Utf8String(headers.next()).asBytes()
            );
        } else {
            user = Identity.ANONYMOUS;
        }
        return user;
    }
514535
public static Identity createOverlayManagerGroup(String name) {
		return ExtendedIdentifiers.createExtendedIdentifier(IfmapStrings.ICS_METADATA_NS_URI,
				IfmapStrings.ICS_METADATA_PREFIX, "overlay-manager-group", name);
	}
963718
public Entity newEntity(QualifiedName id) {
	Entity res = of.createEntity();
	res.setId(id);
	return res;
    }
805914
@SuppressWarnings("unchecked")
    public static <S, T extends S> Mapping<T, S> upcast() {
        return (Mapping<T, S>) IDENTITY_MAPPING;
    }
779119
@Override
	public CPDefinitionInventory create(long CPDefinitionInventoryId) {
		CPDefinitionInventory cpDefinitionInventory = new CPDefinitionInventoryImpl();

		cpDefinitionInventory.setNew(true);
		cpDefinitionInventory.setPrimaryKey(CPDefinitionInventoryId);

		String uuid = PortalUUIDUtil.generate();

		cpDefinitionInventory.setUuid(uuid);

		cpDefinitionInventory.setCompanyId(companyProvider.getCompanyId());

		return cpDefinitionInventory;
	}
136971
@Override
    public IdentificationRequestMessage createIDR() {
        IdentificationRequestMessage msg = new IdentificationRequestMessageImpl(_IDR_HOLDER.mandatoryCodes,
                _IDR_HOLDER.mandatoryVariableCodes, _IDR_HOLDER.optionalCodes, _IDR_HOLDER.mandatoryCodeToIndex,
                _IDR_HOLDER.mandatoryVariableCodeToIndex, _IDR_HOLDER.optionalCodeToIndex);
        return msg;
    }
115535
protected BasicAuthAuthenticator createBasicAuthenticator() throws RegistryException {
        SecurityService securityService = securityServiceRef.getService();
        UserRegistryService userRegistryService = securityService.getUserRegistryService();
        UserRegistry userRegistry = null;
        if (userRegistryService.isUserRegistryConfigured())
            userRegistry = userRegistryService.getUserRegistry();
        SSOCookieHelper sSOCookieHelper = webAppSecurityConfig.createSSOCookieHelper();
        return new BasicAuthAuthenticator(securityService.getAuthenticationService(), userRegistry, sSOCookieHelper, webAppSecurityConfig);
    }
813058
public static Transformers.ResourceIgnoredTransformationRegistry createHostIgnoredRegistry(final HostInfo hostInfo, final RequiredConfigurationHolder rc) {
        return new Transformers.ResourceIgnoredTransformationRegistry() {
            @Override
            public boolean isResourceTransformationIgnored(PathAddress address) {
                if (hostInfo.isResourceTransformationIgnored(address)) {
                    return true;
                }
                if (address.size() == 1 && hostInfo.isIgnoreUnaffectedConfig()) {
                    final PathElement element = address.getElement(0);
                    final String type = element.getKey();
                    switch (type) {
                        case ModelDescriptionConstants.EXTENSION:
                            // Don't ignore extensions for now
                            return false;
//                            if (local) {
//                                return false; // Always include all local extensions
//                            } else if (!rc.getExtensions().contains(element.getValue())) {
//                                return true;
//                            }
//                            break;
                        case PROFILE:
                            if (!rc.getProfiles().contains(element.getValue())) {
                                return true;
                            }
                            break;
                        case SERVER_GROUP:
                            if (!rc.getServerGroups().contains(element.getValue())) {
                                return true;
                            }
                            break;
                        case SOCKET_BINDING_GROUP:
                            if (!rc.getSocketBindings().contains(element.getValue())) {
                                return true;
                            }
                            break;
                    }
                }
                return false;
            }
        };
    }
1316649
public function setIdentity($identity)
    {
        $identity = (string) $identity;
        if ($identity === '') {
            throw new \InvalidArgumentException('$identity cannot be empty');
        }

        $this->identity = $identity;

        return $this;
    }
332278
@PostConstruct
	public void configure() {
		if (identityProvider.isUnsatisfied()) {
			setIdentityProvider(new EJBContextIdentityProvider(context));
		} else {
			setIdentityProvider(identityProvider.get());
		}
	}
940734
protected static InstallationModificationImpl.InstallationState load(final InstalledIdentity installedIdentity) throws IOException {
        final InstallationModificationImpl.InstallationState state = new InstallationModificationImpl.InstallationState();
        for (final Layer layer : installedIdentity.getLayers()) {
            state.putLayer(layer);
        }
        for (final AddOn addOn : installedIdentity.getAddOns()) {
            state.putAddOn(addOn);
        }
        return state;
    }
490680
def create(self, identity):
        
        data = values.of({'Identity': identity, })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return EntityInstance(self._version, payload, service_sid=self._solution['service_sid'], )
1243780
public static org.apereo.cas.web.UrlValidator getInstance() {
        if (INSTANCE == null) {
            INSTANCE = new SimpleUrlValidator(UrlValidator.getInstance(), DomainValidator.getInstance());
        }
        return INSTANCE;
    }