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

How to use
RandomUidGenerator
in
net.fortuna.ical4j.util

Best Java code snippets using net.fortuna.ical4j.util.RandomUidGenerator (Showing top 7 results out of 315)

origin: com.centit.support/centit-utils

  String organizerEmail, String location, String description, List<Pair<String, String>> participators)
  throws MessagingException, IOException {
UidGenerator ug = new RandomUidGenerator();// new UidGenerator("uidGen");
Uid uid = ug.generateUid();
String content = makeICalMeetingText(uid, startTime, endTime, title, organizerName, organizerEmail,
origin: caldav4j/caldav4j

/**
 * Sets the UID of the Calendar, if none exists. Otherwise, does nothing
 * @param calendar Calendar to which we have to add a UID to
 * @return The new UID that has been set. Otherwise the old one.
 * @throws CalDAV4JException on error finding Component.
 */
public static Uid setUID
    (net.fortuna.ical4j.model.Calendar calendar) throws CalDAV4JException {
  Component comp = getFirstComponent(calendar);
  Uid uid =  (Uid) comp.getProperties().getProperty(Property.UID);
  if(uid == null) {
    RandomUidGenerator generator = new RandomUidGenerator();
    uid = generator.generateUid();
    comp.getProperties().add(uid);
  }
  return uid;
}
origin: ical4j/ical4j

/**
 * @return
 * @throws SocketException 
 */
public static TestSuite suite() throws SocketException {
  TestSuite suite = new TestSuite();
  VVenue vv = new VVenue();
  suite.addTest(new VVenueTest("testIsCalendarComponent", vv));
  suite.addTest(new VVenueTest("testValidationException", vv));
  
  UidGenerator g = new RandomUidGenerator();
  vv = new VVenue();
  vv.getProperties().add(g.generateUid());
  suite.addTest(new VVenueTest("testValidation", vv));
  
  return suite;
}
origin: Baralga/baralga

UidGenerator ug = new RandomUidGenerator();
Uid uid = ug.generateUid();
origin: ical4j/ical4j

/**
 * @return
 * @throws SocketException 
 */
public static TestSuite suite() throws SocketException {
  TestSuite suite = new TestSuite();
  VAvailability a = new VAvailability();
  suite.addTest(new VAvailabilityTest("testIsCalendarComponent", a));
  suite.addTest(new VAvailabilityTest("testValidationException", a));
  
  UidGenerator g = new RandomUidGenerator();
  a = new VAvailability();
  a.getProperties().add(g.generateUid());
  a.getProperties().add(new DtStart(new DateTime()));
  suite.addTest(new VAvailabilityTest("testValidation", a));
  
  return suite;
}
origin: ical4j/ical4j

  /**
   * @return
   * @throws SocketException 
   */
  public static TestSuite suite() throws SocketException {
    TestSuite suite = new TestSuite();

    Available a = new Available();
    suite.addTest(new AvailableTest("testIsNotCalendarComponent", a));
    suite.addTest(new AvailableTest("testValidationException", a));
    
    UidGenerator g = new RandomUidGenerator();
    a = new Available();
    a.getProperties().add(g.generateUid());
    a.getProperties().add(new DtStart(new DateTime()));
    a.getProperties().add(new DtStamp());
    a.getProperties().add(new Duration(java.time.Period.ofWeeks(1)));
    suite.addTest(new AvailableTest("testValidation", a));
    return suite;
  }
}
origin: ical4j/ical4j

UidGenerator uidGenerator = new RandomUidGenerator();
UidGenerator ug = new RandomUidGenerator();
Uid uid = ug.generateUid();
net.fortuna.ical4j.utilRandomUidGenerator

Javadoc

Extract from RFC7986:
 
The description of the "UID" property in [RFC5545] contains some 
recommendations on how the value can be constructed.  In particular, 
it suggests use of host names, IP addresses, and domain names to 
construct the value.  However, this is no longer considered good 
practice, particularly from a security and privacy standpoint, since 
use of such values can leak key information about a calendar user or 
their client and network environment.  This specification updates 
[RFC5545] by stating that "UID" values MUST NOT include any data that 
might identify a user, host, domain, or any other security- or 
privacy-sensitive information.  It is RECOMMENDED that calendar user 
agents now generate "UID" values that are hex-encoded random 
Universally Unique Identifier (UUID) values as defined in 
Sections 4.4 and 4.5 of [RFC4122]. 
The following is an example of such a property value: 
UID:5FC53010-1267-4F8E-BC28-1D7AE55A7C99 

Most used methods

  • <init>
  • generateUid

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JList (javax.swing)
  • 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