Tabnine Logo
DomainName
Code IndexAdd Tabnine to your IDE (free)

How to use
DomainName
in
org.apache.shindig.social.opensocial.spi

Best Java code snippets using org.apache.shindig.social.opensocial.spi.DomainName (Showing top 20 results out of 315)

origin: org.apache.shindig/shindig-social-api

/**
 * Set the domainName with a String
 *
 * @param domainName String
 * @throws IllegalArgumentException
 */
public void setDomainName(String domainName) throws IllegalArgumentException {
 this.domainName = new DomainName(domainName);
}
origin: org.apache.shindig/shindig-social-api

@Override
public boolean equals(Object o) {
 if (o == this) {
  return true;
 }
 if (!(o instanceof DomainName)) {
  return false;
 }
 DomainName actual = (DomainName) o;
 return this.getDomainName().equals(actual.getDomainName());
}
origin: org.wso2.org.apache.shindig/shindig-social-api

/**
 * Constructor for DomainName
 *
 * @param domainName String to try and create DomainName from
 * @throws IllegalArgumentException
 */
public DomainName(String domainName) throws IllegalArgumentException {
 setDomainName(domainName);
}
origin: org.apache.shindig/shindig-social-api

@Override
public boolean equals(Object o) {
 if (o == this) {
  return true;
 }
 if (!(o instanceof GlobalId)) {
  return false;
 }
 GlobalId actual = (GlobalId) o;
 return this.getDomainName().equals(actual.getDomainName())
   && this.getLocalId().equals(actual.getLocalId());
}
origin: org.wso2.org.apache.shindig/shindig-social-api

/**
 * Set the domainName after validating its format.
 *
 * @param domainName String
 * @return boolean If succeeded
 * @throws IllegalArgumentException
 */
public boolean setDomainName(String domainName) throws IllegalArgumentException {
 if(validate(domainName)) {
  this.domainName = domainName;
  return true;
 } else {
  throw new IllegalArgumentException("The provided DomainName is not valid");
 }
}
origin: org.wso2.org.apache.shindig/shindig-social-api

@Override
public boolean equals(Object o) {
 if (o == this) {
  return true;
 }
 if (!(o instanceof GlobalId)) {
  return false;
 }
 GlobalId actual = (GlobalId) o;
 return this.getDomainName().equals(actual.getDomainName())
   && this.getLocalId().equals(actual.getLocalId());
}
origin: org.apache.shindig/shindig-social-api

/**
 * Set the domainName after validating its format.
 *
 * @param domainName String
 * @return boolean If succeeded
 * @throws IllegalArgumentException
 */
public boolean setDomainName(String domainName) throws IllegalArgumentException {
 if(validate(domainName)) {
  this.domainName = domainName;
  return true;
 } else {
  throw new IllegalArgumentException("The provided DomainName is not valid");
 }
}
origin: org.wso2.org.apache.shindig/shindig-social-api

/**
 * Set the domainName with a String
 *
 * @param domainName String
 * @throws IllegalArgumentException
 */
public void setDomainName(String domainName) throws IllegalArgumentException {
 this.domainName = new DomainName(domainName);
}
origin: org.wso2.org.apache.shindig/shindig-social-api

@Override
public boolean equals(Object o) {
 if (o == this) {
  return true;
 }
 if (!(o instanceof DomainName)) {
  return false;
 }
 DomainName actual = (DomainName) o;
 return this.getDomainName().equals(actual.getDomainName());
}
origin: org.apache.shindig/shindig-social-api

/**
 * Constructor for DomainName
 *
 * @param domainName String to try and create DomainName from
 * @throws IllegalArgumentException
 */
public DomainName(String domainName) throws IllegalArgumentException {
 setDomainName(domainName);
}
origin: org.wso2.org.apache.shindig/shindig-social-api

/**
 * Try and construct a GlobalId given a string for a DomainName and a string for a LocalId
 *
 * @param domainName String to try and create DomainName from
 * @param localId String to try and create LocalId from
 * @throws IllegalArgumentException
 */
public GlobalId(String domainName, String localId) throws IllegalArgumentException {
 this.domainName = new DomainName(domainName);
 this.localId = new LocalId(localId);
}
origin: org.apache.shindig/shindig-social-api

/**
 * Try and construct a GlobalId given a string for a DomainName and a string for a LocalId
 *
 * @param domainName String to try and create DomainName from
 * @param localId String to try and create LocalId from
 * @throws IllegalArgumentException
 */
public GlobalId(String domainName, String localId) throws IllegalArgumentException {
 this.domainName = new DomainName(domainName);
 this.localId = new LocalId(localId);
}
origin: org.wso2.org.apache.shindig/shindig-social-api

/**
 * Try to construct a GlobalId with a string that contains a valid
 * DomainName and valid LocalId separated by a colon (:).
 *
 * @param globalId String to try and create GlobalId from
 * @throws IllegalArgumentException when the globalId provided is not valid and
 *   cannot be parsed into a valid DomainName and/or LocalId
 */
public GlobalId(String globalId) throws IllegalArgumentException {
 try {
  String[] gid = globalId.split(":");
  if(gid.length != 2) {
   throw new IllegalArgumentException("The provided GlobalId is not valid");
  }
  this.domainName = new DomainName(gid[0]);
  this.localId = new LocalId(gid[1]);
 } catch(IllegalArgumentException e) {
  throw new IllegalArgumentException("The provided GlobalId is not valid");
 }
}
origin: org.apache.shindig/shindig-social-api

/**
 * Try to construct a GlobalId with a string that contains a valid
 * DomainName and valid LocalId separated by a colon (:).
 *
 * @param globalId String to try and create GlobalId from
 * @throws IllegalArgumentException when the globalId provided is not valid and
 *   cannot be parsed into a valid DomainName and/or LocalId
 */
public GlobalId(String globalId) throws IllegalArgumentException {
 try {
  String[] gid = globalId.split(":");
  if(gid.length != 2) {
   throw new IllegalArgumentException("The provided GlobalId is not valid");
  }
  this.domainName = new DomainName(gid[0]);
  this.localId = new LocalId(gid[1]);
 } catch(IllegalArgumentException e) {
  throw new IllegalArgumentException("The provided GlobalId is not valid");
 }
}
origin: org.apache.shindig/shindig-social-api

 @Test(expected=IllegalArgumentException.class)
 public void testDomainNameException() {
  new DomainName("example.com/test");
 }
}
origin: org.wso2.org.apache.shindig/shindig-social-api

 @Test(expected=IllegalArgumentException.class)
 public void testDomainNameException() {
  new DomainName("example.com/test");
 }
}
origin: org.wso2.org.apache.shindig/shindig-social-api

@Test
public void testDomainName() throws Exception {
 DomainName d1 = new DomainName("");
 assertTrue(d1 instanceof DomainName);
 DomainName d2 = new DomainName("localhost");
 assertTrue(d2 instanceof DomainName);
 DomainName d3 = new DomainName("example.com");
 assertTrue(d3 instanceof DomainName);
}
origin: org.apache.shindig/shindig-social-api

@Test
public void testDomainName() throws Exception {
 DomainName d1 = new DomainName("");
 assertTrue(d1 instanceof DomainName);
 DomainName d2 = new DomainName("localhost");
 assertTrue(d2 instanceof DomainName);
 DomainName d3 = new DomainName("example.com");
 assertTrue(d3 instanceof DomainName);
}
origin: org.wso2.org.apache.shindig/shindig-social-api

@Test
public void testGlobalId() throws Exception {
 DomainName dn = new DomainName("example.com");
 LocalId lid = new LocalId("195mg90a39v");
 GlobalId g1 = new GlobalId(dn, lid);
 assertTrue(g1 instanceof GlobalId);
 GlobalId g2 = new GlobalId("example.com:195mg90a39v");
 assertTrue(g2 instanceof GlobalId);
 GlobalId g3 = new GlobalId("example.com", "195mg90a39v");
 assertTrue(g3 instanceof GlobalId);
}
origin: org.apache.shindig/shindig-social-api

@Test
public void testGlobalId() throws Exception {
 DomainName dn = new DomainName("example.com");
 LocalId lid = new LocalId("195mg90a39v");
 GlobalId g1 = new GlobalId(dn, lid);
 assertTrue(g1 instanceof GlobalId);
 GlobalId g2 = new GlobalId("example.com:195mg90a39v");
 assertTrue(g2 instanceof GlobalId);
 GlobalId g3 = new GlobalId("example.com", "195mg90a39v");
 assertTrue(g3 instanceof GlobalId);
}
org.apache.shindig.social.opensocial.spiDomainName

Javadoc

Domain-Name as defined by the OpenSocial 2.0.1 Spec

Most used methods

  • <init>
    Constructor for DomainName
  • equals
  • getDomainName
    Get the domainName.
  • setDomainName
    Set the domainName after validating its format.
  • validate
    Validates the domain name meets the spec definition.

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now